Running PX jobs for a limited number of rows

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
satish_valavala
Participant
Posts: 123
Joined: Wed May 18, 2005 7:41 am
Location: USA

Running PX jobs for a limited number of rows

Post by satish_valavala »

Hi,
I want to run a PX job for a specified number rows.
But, in Job Run Options --->Limits Tab --->Rows -----> both the radio buttons No Limit and Stop Stages after Rows options were disabled.
Could anyone tell a way to do it.
Regards
VS
richdhan
Premium Member
Premium Member
Posts: 364
Joined: Thu Feb 12, 2004 12:24 am

Post by richdhan »

Hi Sathish,

All these options are enabled for a server job but not for parallel job. What do you mean by limited number of rows? Do you want to run for the first 50 rows or you want to limit the number of rows based on a condition. In either case you have to use the Transformer constraint.

HTH
Rich
satish_valavala
Participant
Posts: 123
Joined: Wed May 18, 2005 7:41 am
Location: USA

Post by satish_valavala »

Thanks Rich.
I want to run the job for 50 or 100 or 1000 .....rows
Is there any otherway to do it( without modifying the job)
Regards
VS
kcshankar
Charter Member
Charter Member
Posts: 91
Joined: Mon Jan 10, 2005 2:06 am

Post by kcshankar »

Hi,
We can use Head Stage.
Madhav_M
Participant
Posts: 43
Joined: Sat Jul 10, 2004 5:47 am

Post by Madhav_M »

In case of server jobs you can invoke the job using

$DSHOME/bin/dsjob -run -mode NORMAL -rows n <project_name> <job_name>
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi,
I don't exactly understand your reason for wanting this but it depends on what is your source, here are 2 examples:
1. A sequential file has a "read first rows" option for reading n number of rows (you can use a parameter as value)
2. An Oracle stage can use a where part constraining n rows (also use the $DB_ENABLE_RESERVED_CHAR_CONVERT to allow parameters in the where part to be translated by DS); I think you can't get a specific n rows returned this way since it might not be the same n rows each time.

IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
aesguerra
Participant
Posts: 32
Joined: Tue Sep 09, 2003 9:45 pm

Post by aesguerra »

Hi,

If I remember correctly, there is a tab in the job properties window where you can specifiy the number of rows that will be processed. The rows that are processed are then printed on the log file similar to placing a peek stage.
sun rays
Charter Member
Charter Member
Posts: 57
Joined: Wed Jun 08, 2005 3:35 pm
Location: Denver, CO

Post by sun rays »

This option is enabled in server jobs, but not in PX.
Also you can do a work around as Roy said, but this would only put a limit on the input rows and not on output rows. For Ex your job may be limited to read only 1000 rows and process them, but your output may still have just 10 rows, or 2000 rows.
Post Reply