Hi I need to assign a context variable while the job is running and use the same context variable in the subsequent component. ,
please check the below flow for what my requirement is , tfilelist is the first component
tfilelist--> tinputfiledelimited -->tjava --> tmysqloutput
can someone help me with how I shall proceed ,
Solved! Go to Solution.
tJava component is executed 1rst and only once for the subjob, so tJavaRow is better in this case.
The question is, why do you want to use a context variable as soon as you have a standard global variable which contains what you want?
being new to Talend, what i have understood is standard variable i.e. ((String)globalMap.get("tFileList_1_CURRENT_FILE")); will return me with the file name and extention. i.e if the file name is abc.txt it will return abc.txt, what i need is a table to be created with the name abc , not abc.tc , with the standard variable the table is getting created but with the name "abc.txt".
so i thought doing a substring on the name and storing that in a variable and later using that for table name
the substitution can be made as follows :
this worked for me as I directly put the above code in the table field.
reference on StringHandling Routines:
Introduction to Talend Open Studio for Data Integration.
Practical steps to developing your data integration strategy.
Create systems and workflow to manage clean data ingestion and data transformation.