Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I want to assign a single value from mysql to a context variable using the following job:
tMysqlinput --> max_finding1(main) --> tJava (a screenshot is also attached)
tMysqlinput returns only one value:
"select max(id) as mysql_finding_id from finding;"
tJava :
System.out.println(max_finding1.mysql_finding_id);
context.db_id=max_finding1.mysql_finding_id;
but I'm getting a null value as a result. while printing the result to a log, I can see the corrected value.
Do someone knows why I get null?
Thanks
@Emmaber,you need to re-design a job that below way.
tMysqlinput-->tSetGlobalvar
-->on Subjob then put tJava and pint the global variable value.
to know more about tSetGlobalvar use below link.
https://help.talend.com/reader/WWQ40R_iTE5~~9VkUQrjgQ/xx0nz4uGJnqyc7dKOLN4Wg
@Emmaber,you need to re-design a job that below way.
tMysqlinput-->tSetGlobalvar
-->on Subjob then put tJava and pint the global variable value.
to know more about tSetGlobalvar use below link.
https://help.talend.com/reader/WWQ40R_iTE5~~9VkUQrjgQ/xx0nz4uGJnqyc7dKOLN4Wg
It works, thank you
You are welccoem!!,Kudos also accepted.