You are not logged in.
Announcement
Unanswered posts
|
Thanks for your help. I resolved the problem by combining your ideas with my Talend knowledge.
Hi
Add a context variable in your subjob. ----context.subjobvalue
Add a context variable in your mainjob. ----context.new1
Set tRunjob component as follows.
Then context.new1 in mainjob will be passed into context.subjobvalue in subjob.
Best regards!
Pedro
Yes, I've used TRunjob which is linked to another job - runs 28 times-, and I need a variable that must have an incremental value in the subjob.
For example;
at first run of my subjob, i must have a variable such as context.xxx which has value of 1.
at second run, it must increase to value of 2.
at third run, it must be 3.
So I can use this variable in any component in my subjob.
Hi
Context variable is a global variable and you can get it with most components.
Ctrl+Space. Then you will find it in the first place.
Or you mean you have used a tRunjob?
Best regards!
Pedro
Thanks for your response. But How will I get the variable in my subjob?
Hi
You can add a context variable in Contexts tag.
Then modify your job as follows.
tLoop(28 times)--Iterate-->tJava--Iterate-->subjob.
//Java code in tJava
context.new1=((Integer)globalMap.get("tLoop_1_CURRENT_VALUE"));
System.out.println(context.new1);Best regards!
Pedro
Hello,
I have a subjob which is running 28 times, and I need to have a variable in subjob which will starts from 1 and increase one by one untill 28.
How can I define a variable which will increase one by one at each run of subjob?
Thanks.