Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I'm confused with tFixedinputrows and its output.
here is my simple job:
my input file:
tflowtoiterate : I Use the default (key, value) in global variables
tfixedinputrows:
i replace the country by "aaa" and i kept the same values for id and city
then for my tjavarow, I want to get back the value of the country which was replace by "aaa".
i have this :
output_row.country_replaced = input_row.country;
output_row.city = input_row.city;
output_row.country_init1 = ((String)globalMap.get("row15.country"));
output_row.country_init2 = ((String)globalMap.get("row14.COUNTRY"));
I don't understand the results I get, here is what i have for one line for example:
Why is county_init1 equalled to null and not "aaa" as it is supposed to get what is coming from row15 (output of tfixedinputrows)
I do have the initial country if iuse row14 (input of tflowtoiterate). but why doesn't it work with row 15?
please can someone help me?
Hello,
To understand your job requirement very well, could you please elaborate your case with an example with input and expected output values?
Best regards
Sabrina
No global variables are defined for row15, that's why you are getting null value.
hello
I described the inputs and outputs in my message, isn't it clear?
if not I can rephrase
hello
for row15, I Used the default (key, value) in global variables in the tflowtoiterate.
So my understanding is that global variables are defined.
Where am I wrong?
You are using tFlowToIterate to iterate the rows(row14) coming from tFileInputDelimited, so you can get the column value like this:
output_row.country_init2 = ((String)globalMap.get("row14.COUNTRY"));
If you want to access the rows defined on tFixedFlowInput on tJavaRow, use this expression:
output_row.country_init1 = input_row.country;
Regards
Shong
OK, so the rows defined on tFixedFlowInput are stored in input_row.country.
Rhen there is something I find weird:
afterwars, I thoyught that the rows defined in input_row.country are stored in row15, then row16.
But it seems it does not work like this. Can you explain why?
row15 and row16 have the same data, tLogRow3 is just used to print the data on the console.