How canI sort data without using Sort stage?

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
deva
Participant
Posts: 104
Joined: Fri Dec 29, 2006 1:54 pm

How canI sort data without using Sort stage?

Post 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.
betterthanever
Participant
Posts: 152
Joined: Tue Jan 13, 2009 8:59 am

Re: How to sort data without using Sort stage

Post 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
major
Premium Member
Premium Member
Posts: 167
Joined: Mon Nov 26, 2007 12:21 am

Post by major »

You can use sort command in before/after job sub routine in job properties
mk_ds09
Participant
Posts: 72
Joined: Sun Jan 25, 2009 4:50 pm
Location: Pune

Post 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
deva
Participant
Posts: 104
Joined: Fri Dec 29, 2006 1:54 pm

Post 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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply