You are not logged in.
Thanks for your help. I resolved the problem by combining your ideas with my Talend knowledge.
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.
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.
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.
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?
Thanks for your response. But How will I get the variable in my subjob?
You can add a context variable in Contexts tag.
Then modify your job as follows.
//Java code in tJava context.new1=((Integer)globalMap.get("tLoop_1_CURRENT_VALUE")); System.out.println(context.new1);
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?