Scenario:
Talend MDM DI job with 10 subjobs that each move data into staging tables.
One of the 10, subjob #9, fails.
Re-run subjob #9 from TAC Job Conductor.
What I Think I Know:
I can add a Context Parameter in Job Conductor such as "RunSubjobNumber9"
A runif trigger can likely reference a Context Parameter.
Question:
How can I reference the "RunSubjobNumber9" Context Parameter in that is part of the job run process kicked off in Job Conductor? The runif trigger is where I want to reference this Job Conductor passed Context Parameter.
Alternate:
Is there another way to accomplish this task: Single out a subjob within a DI job to run it without opening Talend Studio.
Thanks,
Allen
Solved! Go to Solution.
Here is the tested solution.
1. Each subjob must have a uniquely named context with type Boolean and context value set to false.
2. Each subjob needs a Run If trigger with this condition: context.RunSubJob1==true. I use one default tJava component to run Run If triggers to each subjob.
3. Once the job is published and the TAC Job Conductor Execution task's Context parameters can be seen...
Goal: Run a Subjob within a job using Job Conductor
Test: Put context parameters in Job Conductor
for a job Exection Task. One of the context
parameters is empty and the other has a value.
Test to see if the one with the value causes
a Subjob to run.
Scenario:
Job Conductor
Project in Talend Job Conductor in Ready to Run Status.
Job Exection Task created which Deploys and Runs without error.
Two Context Parameters set that reference SubJobs in the Job.
Context parameter Value
Subjob_A_Run "" -- Value ommitted for the test
Subjob_B_Run "SubjobBRun"
Talend MDM Platform (6.31)
Job Flow:
tPreJob->OnComponentOK->tJava_1 (Code: String foo = "bar")
tJava_1->RunIf #1 (Condition: context.Subjob_A_Run=="SubjobARun")->tMSSqlInputSubjobA
tJava_1->RunIf #2 (Condition: context.Subjob_B_Run=="SubjobBRun")->tMSSqlInputSubjobB
Problem:
In this real scenario, nothing happens. I expected SubjobB to run, but it did not. I feel like I am missing a step. If there is a better method for running a Subjob within a job, I am open to all solutions.
Thanks
Goal: Run a Subjob within a job using Job Conductor
Test: Put context parameters in Job Conductor
for a job Exection Task. One of the context
parameters is empty and the other has a value.
Test to see if the one with the value causes
a Subjob to run.
Scenario:
Job Conductor
Project in Talend Job Conductor in Ready to Run Status.
Job Exection Task created which Deploys and Runs without error.
Two Context Parameters set that reference SubJobs in the Job.
Context parameter Value
Subjob_A_Run "" -- Value ommitted for the test
Subjob_B_Run "SubjobBRun"
Talend MDM Platform (6.31)
Job Flow:
tPreJob->OnComponentOK->tJava_1 (Code: String foo = "bar")
tJava_1->RunIf #1 (Condition: context.Subjob_A_Run=="SubjobARun")->tMSSqlInputSubjobA
tJava_1->RunIf #2 (Condition: context.Subjob_B_Run=="SubjobBRun")->tMSSqlInputSubjobB
Problem:
In this real scenario, nothing happens. I expected SubjobB to run, but it did not. I feel like I am missing a step. If there is a better method for running a Subjob within a job, I am open to all solutions.
Thanks
Here is the tested solution.
1. Each subjob must have a uniquely named context with type Boolean and context value set to false.
2. Each subjob needs a Run If trigger with this condition: context.RunSubJob1==true. I use one default tJava component to run Run If triggers to each subjob.
3. Once the job is published and the TAC Job Conductor Execution task's Context parameters can be seen...