Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a value in my table as
name
xyz
how to store the value xyz to context variable. so that we can use it for further use.
use below code in tJavarow:
context.var = context.var+row4.newColumn ;
@Darmesh,you can load to context using tContextLoad and check the below link to more about tContextLoad.
https://help.talend.com/reader/wDRBNUuxk629sNcI0dNYaA/xH2TyYr_AmQnKwOYlqVCvA
With the help of tjavarow component, you can do so.
So, your job would be like :
tmssqlinput-->tjavarow
In tjavarow write below code.
context.var = input_row.name;
first i have created context variable as var and did not enter anything in value column.
But it is not loading anything.
@Darmesh you should write input_row.column_name rather than row4.column_name.
System.out.println(context.var);
Setting a value to a context variable will not change what you can see into the Context tab, it changes only the current value for the runing job.
use below code in tJavarow:
context.var = context.var+row4.newColumn ;