how ro filter file

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
Mhasan
Participant
Posts: 38
Joined: Wed Apr 19, 2006 10:03 pm
Location: Bangalore

how ro filter file

Post by Mhasan »

Hi ,

I want to read only 1000 records form 3000 records FROM a Flat File using sequential file stage. how to sovle this situation
Thanks
M A hasan
balajisr
Charter Member
Charter Member
Posts: 785
Joined: Thu Jul 28, 2005 8:58 am

Post by balajisr »

You can use Sequential file stage's filter option to filter the data.
Maveric
Participant
Posts: 388
Joined: Tue Mar 13, 2007 1:28 am

Post by Maveric »

Based on what condition do you want to filter these records? If you want only the first 1000 rows then set the property "Row Number Column" to a field say RowCount in the sequential file stage and then use filter stage to filter out the records on RowCount<1000.
balajisr
Charter Member
Charter Member
Posts: 785
Joined: Thu Jul 28, 2005 8:58 am

Post by balajisr »

If OP has to read only first 1000 rows then set "Read First Rows" option to 1000. Filter option is not required.

Unless OP specifies the filter condition we can only guess.
JoshGeorge
Participant
Posts: 612
Joined: Thu May 03, 2007 4:59 am
Location: Melbourne

Post by JoshGeorge »

You can use Head stage. You have option to read N rows there. Else use Unix command in filter option of sequential file stage and fetch only first 1000 rows.
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
Post Reply