Search code examples
talend

Get the results of a flow into a global variable


I have a flow in my Talend job that returns just one value (one row with one column), and I want to store this value in a global variable. What is the best way to do it? So far I have been using tFlowToIterate in this scenario, but this seems like a hack - because I really do not need to iterate. I'm wondering if there are better alternatives.


Solution

  • there is different solutions personnaly I also use the tFlowToIterate method but you can also use the tJava components or juste use the tSetGlobalVar component which is the component use in this case (one row).

    Here is how to use it :

    enter image description here

    I hope this answers your question :)