Passing parameters from TAC to perform a job

I have an assignment that is quite general and different parameters are passed as context parameters from different files. But I still need to "hard-code" the context of the filename and create multiple jobs in TAC (Talend Administration Console) to execute. What I was hoping to do was to use a common work and pass a context file to be used for this work from TAC. Then, as part of the execution of the job, the context file that is passed in will be read and loaded by the context. My question is, how can I achieve this by basically passing various context files from TAC based on runtime?

Thank.

+3


source to share


1 answer


One approach might be to wrap the generic job with multiple wrapper jobs that contain the contexts (or links to the corresponding context files) in them, and pass those context variables to the generic child job.

This will work well if you have some common functionality that is needed for several different jobs, but want different data to be passed to them, or want the data to be presented to them differently.

If you changed the logic of the common task, then all your wrapper tasks will use the new logic at once.



Of course, if you have an Enterprise license (which you do if you have access to TAC), the best alternative to this might be jobs that are for this purpose and can be used to completely change data sources / targets and just decouple the logic.

Alternatively, you can use TAC to pass custom context variables on demand. To do this, click on a job in the job explorer, and then click the Context Options button at the bottom (next to triggers). Here you can program any values ​​you want.

I usually use this for jobs where I have a context variable set by default for most runs, but want to tweak things at runtime from time to time. This way I can have a context variable that allows my data to be filtered and I have this as the default for everyone. At runtime, I can select the context variable of the filter criterion and tell what it is for filtering.

+1


source







All Articles