Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
So I have a talend job that has a group of components similar to this:
I am trying to use the data passed through row3 in tDBRow_2 via (String)globalMap.get but I seem to not be getting anything from it. is there any way to retrieve the data from this row and use it in dbrow2? Preferably in a way that takes into account multiple rows being passed through that row?
Hi @Michael Douglas
By default, tFlowToIterate creates global variables for every column on its input schema (unless you uncheck the "Use the default (key, value) in global variables" option).
So, if you have a column called "newColumn" on tJavaRow output schema, you could refer to it on tDBRow by using the following syntax:
((String)globalMap.get("row3.newColumn"))
Hi,
Thanks for the response and sorry if this wasn't clear from the way I wrote the question but this is already what I have been trying but it keeps returning null.
Hi @Michael Douglas
In this case, to investigate why the variable keeps returning null, I would try printing the column contents on tJavaRow, running the Job using Traces Debug or activating Log4j at level TRACE.
If the null value reason still doesn't show up, could you share some screenshots of the components (tJavaRow, tFlowToIterate, tSetGlobalvar and tDBRow) configuration?