Conditional execution
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54
- Joined: Mon Dec 24, 2007 9:27 am
Conditional execution
Hello,
In a sequence I have an execute command which calls a bteq to populate a table. Upon successful... the sequence continues to executes the next stage, which is a datastage job that joins the table that is populated in the previous stage with another huge fact table.
Most of the time the first table that is populated will not have any rows. If there are no rows in this table, there is no need to execute the next stage (calls a ds job) to join the huge fact table to this empty table.
How can I avoid doing this? Basically, I want to continue to the next stage in the sequence, if there exists data in the table that I just populated.
Thanks
In a sequence I have an execute command which calls a bteq to populate a table. Upon successful... the sequence continues to executes the next stage, which is a datastage job that joins the table that is populated in the previous stage with another huge fact table.
Most of the time the first table that is populated will not have any rows. If there are no rows in this table, there is no need to execute the next stage (calls a ds job) to join the huge fact table to this empty table.
How can I avoid doing this? Basically, I want to continue to the next stage in the sequence, if there exists data in the table that I just populated.
Thanks
-
- Participant
- Posts: 467
- Joined: Tue Mar 20, 2007 6:36 am
- Location: Chennai
- Contact:
>You would have to get the count of records from your table somehow (Maybe create another job which gets the count)
>Read the count from the file which you created (You can do this using a small basic routine or by using an execute command activity)
>Branch using a conditional activity based on the output from the previous stage
>Read the count from the file which you created (You can do this using a small basic routine or by using an execute command activity)
>Branch using a conditional activity based on the output from the previous stage
Minhajuddin
<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>
<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI
Re: Conditional execution
kishorenvkb wrote:Hello,
In a sequence I have an execute command which calls a bteq to populate a table. Upon successful... the sequence continues to executes the next stage, which is a datastage job that joins the table that is populated in the previous stage with another huge fact table.
Most of the time the first table that is populated will not have any rows. If there are no rows in this table, there is no need to execute the next stage (calls a ds job) to join the huge fact table to this empty table.
How can I avoid doing this? Basically, I want to continue to the next stage in the sequence, if there exists data in the table that I just populated.
Thanks
You have to many options
here are the two options
1. Get row count from the links
2. Count the number of rows in the table
and and don't forget to store it some where probably environment variable or user variable.
and on the basis of that you can trigger the job.
For more details on these options, search forum.
one more option is to wait for kim to see this message
Regards,
Priyadarshi Kunal
Genius may have its limitations, but stupidity is not thus handicapped.
Genius may have its limitations, but stupidity is not thus handicapped.
-
- Participant
- Posts: 54
- Joined: Mon Dec 24, 2007 9:27 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Premium Member
- Posts: 291
- Joined: Wed Sep 26, 2007 11:23 am
- Location: Madrid, Spain
-
- Premium Member
- Posts: 291
- Joined: Wed Sep 26, 2007 11:23 am
- Location: Madrid, Spain
-
- Premium Member
- Posts: 291
- Joined: Wed Sep 26, 2007 11:23 am
- Location: Madrid, Spain