tFileList export job and variable for the folder

Four Stars

tFileList export job and variable for the folder

Hi everybody,

 

I have a job which is composed of the following tools : tFileList-->tFileInputExcel-->tMap-->tMySqlOutput.

 

I'd like to export my job as a standalone one and I try to figure out how I can define some kind of variable to be able to put a custom folder as the input folder for the tFileList component. I've heard about context variables but I don't know where to define and use them.

 

Do you know how can I achieve that ?

 

Thanks in advance


Accepted Solutions
Six Stars

Re: tFileList export job and variable for the folder

Hi Spray
Please find the below tutorial on context variables

https://help.talend.com/reader/JdTBzKszzXoWvjpEJD3EBA/xbhyQKORQNX5V8yw8WAb8w

Context variable is a key value pair where key is the variable name value is the variable value

In your prejob you can use tfileinputdelimited-->tcontextload to load the context values from a file or
toracleinput-->tcontextload to load context values from a DB table

Then you can use the context variable any where in your job. During runtime context variable will be replaced with a value you have provided.

Thanks
Ashok

All Replies
Six Stars

Re: tFileList export job and variable for the folder

Hi Spray
Please find the below tutorial on context variables

https://help.talend.com/reader/JdTBzKszzXoWvjpEJD3EBA/xbhyQKORQNX5V8yw8WAb8w

Context variable is a key value pair where key is the variable name value is the variable value

In your prejob you can use tfileinputdelimited-->tcontextload to load the context values from a file or
toracleinput-->tcontextload to load context values from a DB table

Then you can use the context variable any where in your job. During runtime context variable will be replaced with a value you have provided.

Thanks
Ashok