Page 1 of 1
How canI sort data without using Sort stage?
Posted: Fri Jan 30, 2009 9:55 am
by deva
Hi,
How to sort the data using datastage without using sort stage?
Can any one tell me how to use the UNIX sort commond in transformer?
I am using Datastage 8 version and HP unix.
Thanks in advance.
Re: How to sort data without using Sort stage
Posted: Fri Jan 30, 2009 10:01 am
by betterthanever
[quote]
How can I sort data using datastage without using the sort stage?
Can anyone tell me how to use the UNIX sort commond in transformer?[/quote]
you can sort the data in the transformer based on a key
Posted: Fri Jan 30, 2009 10:01 am
by major
You can use sort command in before/after job sub routine in job properties
Posted: Fri Jan 30, 2009 10:07 am
by mk_ds09
Check the input properties of the transformers, there is option of partitioning, in that there is option of sort
1. Stable :- This is for previously sorted datasets..
2. Uniqe :- This will retain only first record if there are duplicates on the sorting key values.
hope this helps
-----------------
MK
Posted: Fri Jan 30, 2009 1:59 pm
by deva
mk_ds09 wrote:Check the input properties of the transformers, there is option of partitioning, in that there is option of sort
1. Stable :- This is for previously sorted datasets..
2. Uniq :- This will retain only first record if there are duplicates on the sorting key values.
hope this helps
-----------------
MK
I want to sort the file data in the transwarmer. Can you please give me the statement for befou/after routine
Posted: Fri Jan 30, 2009 2:43 pm
by ray.wurlod
mk_ds09 wrote:Check the input properties of the transformers, there is option of partitioning, in that there is option of sort
1. Stable :- This is for previously sorted datasets..
2. Uniq :- This will retain only first record if there are duplicates on the sorting key values.
hope this helps
-----------------
MK
No help at all - this is a server job.
Posted: Fri Jan 30, 2009 2:45 pm
by ray.wurlod
If the data are coming from a database table, you can include an ORDER BY clause in the extraction SQL.
If the data are coming from a file you can use an operating system level sort utility to sort that file - you can do that in a before-job subroutine as mentioned or in a Filter command to the Sequential File stage.