build job - execute with context

One Star

build job - execute with context

1.I have created a parent job which call 10 child job. job - standalone
3. I am using windows environment - so going to use .bat file to execute the job.

My problem is.. I have used 2 context variables - opendate and closedate in all child jobs.
Now while executing I have to pass these 2 parameters.
How can I achieve this?

Five Stars

Re: build job - execute with context

You need to define your context variables in your parent as well as the child Jobs.
You can then pass the values explicitly, or you can check "Transmit whole context" on each tRunJob.
You can then pass your parameters at runtime as a command line argument, for example: -
--context_param myString="value"
One Star

Re: build job - execute with context

Thank you so much for your reply. 
I am using windows environment.  so, I am using .bat file for executing.  To change the context value, I am editing the batch file. 
My question now is how can I pass the parameter in command prompt with executable file (to avoid editing .bat file)
example: MyJobName "2016-01-01 00:00:00" "2016-02-01 00:00:00"
Thank you.  Appreciate you for your time and effort for helping me.
Five Stars

Re: build job - execute with context

At the end of the command line within the BAT file, you'll se the parameter "%*".
This means that any command line parameters that you pass to the BAT file, will be passed on.


Talend named a Leader.

Get your copy


Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables


How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration


Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach