Is ur input a file or a ODBC/DRS stage?? If the data is fetched using a SQL query in the ODBC/DRS stage then use ORDER BY DESC to get the data in the reverse order.
If your inpt is a file then I doubt if we can do it in DS.
thank you for the reply.. however,
the source table is not sorted in asc or desc base order. my main problem is the duplicates in the source table and using hash file stage i can remove the duplicates by keeping the last record while i need the first one.. so i thought of reversing the records order by some mechanism to get through this problem..
your post opened my mind to new techniques i might use.. thanks a lot
If you do end up using a hash file to remove the duplicates in your file, you could store the record number (@INROWNUM) along with your data. Then, by accessing the hash file with a UV stage, you could pull them back out in reverse order.
-craig
"You can never have too many knives" -- Logan Nine Fingers
You could send it through a sort stage sorting in ascending order. With this sorted data you can remove duplicates with an aggregation stage or a hash file or stage variables. See the deduplicing FAQ for details of each.
With a hash file you will find records overwriting each other leaving you with the last record for each combination.
With the aggregation stage you can use the "Last" aggregate function on non group by fields. Make sure you populate the Sort information on your input columns to speed up the performance of the aggregation stage.
Stage variables will probably be the fastest method but also the trickiest to code.
You can do it very easily. Put your source of data first then put a sequence generator stage, generate sequence from 1 for each of the records. Then sort the records in decending order. You will get the desire result.
Exactly. The OP specified "Server" as the job type, so it doesn't really help to give PX specific answers. Besides, there's a different forum for Parallel jobs.
-craig
"You can never have too many knives" -- Logan Nine Fingers