Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
android1686764069
Contributor
Contributor

Strange result with the output of tFixedinputrows

Hello

I'm confused with tFixedinputrows and its output.

here is my simple job:

0695b00000nR7ukAAC.png

my input file:

0695b00000nR7vJAAS.png

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 city0695b00000nR7vxAAC.png

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)

0695b00000nR7ymAAC.png

I do have the initial country if iuse row14 (input of tflowtoiterate). but why doesn't it work with row 15?

Labels (4)
8 Replies
android1686764069
Contributor
Contributor
Author

please can someone help me?

Anonymous
Not applicable

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

Anonymous
Not applicable

No global variables are defined for row15, that's why you are getting null value.

 

android1686764069
Contributor
Contributor
Author

hello

I described the inputs and outputs in my message, isn't it clear?

if not I can rephrase

android1686764069
Contributor
Contributor
Author

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?

Anonymous
Not applicable

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

android1686764069
Contributor
Contributor
Author

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?

Anonymous
Not applicable

row15 and row16 have the same data, tLogRow3 is just used to print the data on the console.