How to pass the filename from tfileoutputdelimited parent job to tfileinputdelimited child job usning context parameter/variable
We have a requirement where we want to pass the filename created in the tfileoutputdelimited parent job to the tfileinputdelimited child job. Running the job as independent process run's fine. The issue is when passing the context parameters to the child job.
The child job is a shared job and can be used with other parent jobs. The tFileInput component (child job) is not able to validate the context parameter when passed in the Filename. I also tried by passing the (String)globalMap.get("xx.context.inputfiletest") in the Filename. No luck. I have attached the screen shot and would appreciate if someone can provide a solution.
So you are loading data from your DB to your tFileOutputDelimited first. Are you trying to load to one file with a preset context variable for the filename? Alternatively are you trying to load into several different files with a filename supplied by the DB? This requires a very different way of working.
To supply the tRunJob with context variable values, you can get rid of the tJava. You can use the globalMap values set by the tFlowToIterate directly. Select the context variable within the tRunJob that you wish to use and assign it the globalMap value. The tRunJob must be linked via the iterate link to the tFlowToIterate.
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Part 2 of a series on Context Variables
Learn how to do cool things with Context Variables
Read about some useful Context Variable ideas