[resolved] How to get a result into a context variable?

One Star

[resolved] How to get a result into a context variable?

Hi!
Is it possible to get a result of a job into a context.variable for further use in that job?
I'm thinking about something like:
select max(xy) from abc ---> context.maxvalue
Thanks for your help!
Pete

Accepted Solutions
Community Manager

Re: [resolved] How to get a result into a context variable?

Hi Pete
You can put the result to a context variable or a global variable on tJavaRow or tSetGlobalVar, for example, on tJavaRow:
tMysqlInput--main--tJavaRow
on tJavaRow:
context.varName=input_row.columnName;
You can find scenario about tSetglobalvar in this page:
https://help.talend.com/search/all?query=tSetGlobalVar&content-lang=en
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business

All Replies
Community Manager

Re: [resolved] How to get a result into a context variable?

Hi Pete
You can put the result to a context variable or a global variable on tJavaRow or tSetGlobalVar, for example, on tJavaRow:
tMysqlInput--main--tJavaRow
on tJavaRow:
context.varName=input_row.columnName;
You can find scenario about tSetglobalvar in this page:
https://help.talend.com/search/all?query=tSetGlobalVar&content-lang=en
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business