To run a job based on the output of the first job
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 104
- Joined: Thu Jul 12, 2007 11:32 pm
- Location: Canada
To run a job based on the output of the first job
Hi,
I have an requirement where in i need to run the job2 based on the output value of the column of the job1.
Job1 --> Job 2
Can anyone please help me on this.
I have an requirement where in i need to run the job2 based on the output value of the column of the job1.
Job1 --> Job 2
Can anyone please help me on this.
Could you specify the problem a bit more, since generally a job processes more than one record, and thus each column can have many values.
Generally you could make a constraint in a transform stage which either creates a text file with the value you want, or could set the user status to that value, which a sequence can pick up and pass to the second job.
Generally you could make a constraint in a transform stage which either creates a text file with the value you want, or could set the user status to that value, which a sequence can pick up and pass to the second job.
-
- Premium Member
- Posts: 104
- Joined: Thu Jul 12, 2007 11:32 pm
- Location: Canada
In my first job i have source as oracle table i need to execute a sql query to find out the value of the column in that table, that value will be success or aborted, if the value is aborted the next job should not start and if the value is success then the next job should be initiated.
Regards,
Aditya
Regards,
Aditya
-
- Premium Member
- Posts: 104
- Joined: Thu Jul 12, 2007 11:32 pm
- Location: Canada
In my case, the job 1 will always be successfull.
In the job1 i am writing a column into a dataset file
i am fetching the column1 value from the oracle table.
Column1
======
Success or aborted.
If the column1 value is "aborted" then the main sequence should abort. if the column1 value is "success" then the job2 should start.
MAin seq
job1 --> job2
In the job1 i am writing a column into a dataset file
i am fetching the column1 value from the oracle table.
Column1
======
Success or aborted.
If the column1 value is "aborted" then the main sequence should abort. if the column1 value is "success" then the job2 should start.
MAin seq
job1 --> job2
-
- Premium Member
- Posts: 104
- Joined: Thu Jul 12, 2007 11:32 pm
- Location: Canada
Hi Chulett/Andrw
Thanks for the reply,
Now i got how to proceed on this,
but i am stuck in the execute command triggers to start or abort the job.
If Trim(Execute_Command_22.$CommandOutput) = 'SUCCESS' Then Else
I am unable to get which command to use to start the next job if the output is success and to abort the job if the status is aborted.
Thanks for the reply,
Now i got how to proceed on this,
but i am stuck in the execute command triggers to start or abort the job.
If Trim(Execute_Command_22.$CommandOutput) = 'SUCCESS' Then Else
I am unable to get which command to use to start the next job if the output is success and to abort the job if the status is aborted.
-
- Premium Member
- Posts: 104
- Joined: Thu Jul 12, 2007 11:32 pm
- Location: Canada
Craig,
I have kept the below code but still the job2 is not been triggered
Trim(Exec_column.$CommandOutput) = "SUCCESS"
then i have link to the job2 and otehr wise link to the terminator activity
The job1 is finished succesfully but the job2 is not ben initiated.
JOb1 --> executecmd --> job2
|
V
terminator activity
I have kept the below code but still the job2 is not been triggered
Trim(Exec_column.$CommandOutput) = "SUCCESS"
then i have link to the job2 and otehr wise link to the terminator activity
The job1 is finished succesfully but the job2 is not ben initiated.
JOb1 --> executecmd --> job2
|
V
terminator activity
-
- Premium Member
- Posts: 104
- Joined: Thu Jul 12, 2007 11:32 pm
- Location: Canada
-
- Participant
- Posts: 342
- Joined: Tue Nov 04, 2008 10:38 am
- Location: Chennai, India
-
- Premium Member
- Posts: 104
- Joined: Thu Jul 12, 2007 11:32 pm
- Location: Canada
I am not able to find any output in the director log for the execute command activity.
i have used Exec_DAILY_SALES_BATCH_STATUS.$CommandOutput <1>= "SUCCESS"
But still the next job is not been intiated.
i have used Exec_DAILY_SALES_BATCH_STATUS.$CommandOutput <1>= "SUCCESS"
But still the next job is not been intiated.
Last edited by adityavarma on Thu Oct 14, 2010 12:44 am, edited 1 time in total.
-
- Premium Member
- Posts: 104
- Joined: Thu Jul 12, 2007 11:32 pm
- Location: Canada
Sorry , My mistake and it is a very silly one
I have kept the trigger as
job_name.$JobStatus=2 Or job_name_Load.$JobStatus =3 and have send the link to execute command acitivity for which the trigger only will execute the command activity only if the job1 is aborted,but the job is running successfully, so the execute command acitivity is not been triggered.
I have executed the below triggers
Exec_DAILY_SALES_BATCH_STATUS.$CommandOutput<1>="SUCCESS"
Trim(Exec_DAILY_SALES_BATCH_STATUS.$CommandOutput)<1>= "SUCCESS"
Trim(Ereplace(Exec_DAILY_SALES_BATCH_STATUS.$CommandOutput,"'","") )
For all the above triggers the
Reply=0
Output from command ====>
"SUCCESS"
but still the main sequence is aborting.
I have found out one more issue, i have created a parameter set for all the jobs , but i am unable to find the parameters in the execute command acitivity.
Regards,
Aditya
I have kept the trigger as
job_name.$JobStatus=2 Or job_name_Load.$JobStatus =3 and have send the link to execute command acitivity for which the trigger only will execute the command activity only if the job1 is aborted,but the job is running successfully, so the execute command acitivity is not been triggered.
I have executed the below triggers
Exec_DAILY_SALES_BATCH_STATUS.$CommandOutput<1>="SUCCESS"
Trim(Exec_DAILY_SALES_BATCH_STATUS.$CommandOutput)<1>= "SUCCESS"
Trim(Ereplace(Exec_DAILY_SALES_BATCH_STATUS.$CommandOutput,"'","") )
For all the above triggers the
Reply=0
Output from command ====>
"SUCCESS"
but still the main sequence is aborting.
I have found out one more issue, i have created a parameter set for all the jobs , but i am unable to find the parameters in the execute command acitivity.
Regards,
Aditya