etl - Talend - load context to subjobs -
I am trying to create a main function in Talend which would scan a directory for multiple files (f1.csv, f2.xls ...) and then run a different job created for the specific file. I would like to create a reference variable that captures the file name and makes the proper job call. How can I install context variables to store the file name of the file I found and pass it in other jobs?
Create a job called Baby Job, go to the context tab, and type a new reference variable in which The file is with the string. Inside, you can put components that refer to this reference. File Variables Now, create another job called the Main Job, put a tFileList into the desired path, configure the settings in this component where you want to find the files. After that, drag the child_job from the left panel (job design) or insert a turnbuck and set it to call the child_job job. In the end, join the repeated link with child_job in t_philelist, select child_job, the component tab Go to, add a parameter (file parameter that you created earlier) and set the value (string) globalMap.get ("tFileList_1_CURRENT_FILE")) and you have done it!
Something like this:
Comments
Post a Comment