Reading Data Through Dataset

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
ntr
Participant
Posts: 110
Joined: Fri Dec 18, 2009 10:30 am
Location: pune

Reading Data Through Dataset

Post by ntr »

hi,

i have a dataset with 1,00,000 records. is it possible to read only 2,000

records from that at the time of reading??


Thanks
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

No, the dataset stage does not have that option. You would need to put a stage right after the read. I know that a Transform stage with the constraint "@INROWNUM < 2000" (in a 1-node configuration) would work, but there should be some other more efficient way that I can't think of right now.
ntr
Participant
Posts: 110
Joined: Fri Dec 18, 2009 10:30 am
Location: pune

Post by ntr »

ok Thanks ArndW
BI-RMA
Premium Member
Premium Member
Posts: 463
Joined: Sun Nov 01, 2009 3:55 pm
Location: Hamburg

Post by BI-RMA »

Under the Debug / Development-Tab there are the two stages Head and Tail. You can use them to limit the number of rows sent downstream, either from the top or the bottom of the heap (like Unix-commands).
"It is not the lucky ones are grateful.
There are the grateful those are happy." Francis Bacon
bhasds
Participant
Posts: 79
Joined: Thu May 27, 2010 1:49 am

Reading Data Through Dataset

Post by bhasds »

In transform stage @PARTITIONNUM + (@NUMPARTITIONS * (@INROWNUM - 1)) + 1 <2001(in multiple node Configuration file) should work fine.
Post Reply