Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, everyone.
I'm having an issue when trying to assign different values to different global variables with tsetglobalvar. It gives the value of the last set variable to all the other variables. look at the image attached.
All the variables get the value of the DestinationSchema and I dont know why.
Your help is very much appreciated.
If you need to assign the input value to context variable, use tJavaRow instead of tsetGlobalvar component, eg:
...main---tJavaRow
on tJavaRow:
context.varName=input_row.columnName;
Hello @Lucas Pujol
Try putting the Key names between quotes like "DestinationUrl" for example. I'd also suggest you to remove "context." from global variable names to avoid mistaking them with context variables.
Then test your Talend Job again using the following syntax:
((String)globalMap.get("DestinationUrl"))
Remember to change the String data type according with the type of each variable defined in your "row12" data structure.
If you need to assign the input value to context variable, use tJavaRow instead of tsetGlobalvar component, eg:
...main---tJavaRow
on tJavaRow:
context.varName=input_row.columnName;