How to Sort the data in the Sequential Stage

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Ashish
Participant
Posts: 57
Joined: Tue Jan 31, 2006 1:16 am

How to Sort the data in the Sequential Stage

Post by Ashish »

I know there is a filter property in the sequential stage but i dont know how to use that can someone give me the example.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Search on this forum will give your more insight.
The existing filter option enables you to use Unix command in it.
Say for example,
if you want to read a file in a sorted order use the filter option

Code: Select all

sort <filename>| [options]
And make the file name to dummy by pointing to /dev/null
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Post by us1aslam1us »

kumar_s wrote:Search on this forum will give your more insight.
The existing filter option enables you to use Unix command in it.
Say for example,
if you want to read a file in a sorted order use the filter option

Code: Select all

sort <filename>| [options]
And make the file name to dummy by pointing to /dev/null
Hi Kumar

Where do we have filter option?

Sam
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

In the sequential file's General Tab, check the "Stage uses filter command"
The "Filter command" text box gets enabled in the Output tab.
Thats where you enter the required command.
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
Perwezakh
Premium Member
Premium Member
Posts: 38
Joined: Mon Jun 06, 2005 9:13 am
Location: Chicago, IL

Re: How to Sort the data in the Sequential Stage

Post by Perwezakh »

Ashish wrote:I know there is a filter property in the sequential stage but i dont know how to use that can someone give me the example.
You can use sort stage which is supplied by DS (remember this will be very slow if you are dealing with big file) or you can use CoSort (this is tool by which you can do sort, aggregate and many more things. If your company has this I can help you to setup script).
Let me know this helps you or not Ashish
us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Post by us1aslam1us »

narasimha wrote:In the sequential file's General Tab, check the "Stage uses filter command"
The "Filter command" text box gets enabled in the Output tab.
Thats where you enter the required command.
I thought we are talking about PX sequential file?

Sam
thompsonp
Premium Member
Premium Member
Posts: 205
Joined: Tue Mar 01, 2005 8:41 am

Post by thompsonp »

If we are talking PX (as that's the forum we're in) then the filter is an option that can be selected in the bottom right hand pane.

As its name suggests it is used to pass the data through a filter program.

If you want to sort the data coming from a sequential file use a sort stage, if it is being written to the sequential file use the appropriate collection method on the partitioning tab.
Post Reply