How to read only one row from 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
MVL
Premium Member
Premium Member
Posts: 33
Joined: Wed Apr 30, 2008 5:43 am

How to read only one row from dataset?

Post by MVL »

Hello

Is there any way to read only 1 row from a dataset? (For testing of a job)
I can use filter stage after DataSet stage but still job is going to read all the rows from dataset.

The problem is that this is a huge input dataset and I want to test my job with just 1 row. Do we have some stage to read only one row from DataSet (Something like Universe stage for hash file...)?

Thanks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

No. That's not how parallel jobs work. They move (large) blocks of data. The Data Set is copied (using a copy operator) into the virtual Data Set associated with the link to which it connects. Yes, you can use a Filter, Switch or Transformer stage to limit what comes off that link, but operators all work only with virtual Data Sets.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
MVL
Premium Member
Premium Member
Posts: 33
Joined: Wed Apr 30, 2008 5:43 am

Post by MVL »

Thanks Ray

When we use 'veiw data' option from designer it asks number of rows to be displayed.

If we select 1 then only one row is selected there. (Even there it reads entire block?) Why dont we have same functionality in a form of stage?

Thanks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You do. Look at the osh generated and executed by View Data. It includes a head operator to limit the rows according to your selection.
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