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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to use input_row.Name to set for each row a new fileName output?

I read rows from a data source1. (schema DS1.Name, DS1.data, ...)
I wish to change fileName output with DS1.Name value. How can I do it?.
DS1 -> FileOutDS1.Name
a tJavaRow component enables to get/set a new context var value. but if this var is used in the fileName settings of the output file, it is first set to null (initial context val) and the new context value is not refreshed before the subjob execution ends (data source1 reading).
Labels (3)
12 Replies
Anonymous
Not applicable
Author

Hi,
I created a example based on 3.0.0. But this should work in 2.4.x too. I hope it will make it clearer.
The input file is:
fileA.txt;1,2,3,4,5
fileB.txt;a,b,c,d,e
fileC.txt;q,w,e,r,t,z,u,i,o
fileD.txt;A,1,B,2

One output example (fileD.txt):
A
1
B
2

This examples uses a file as input. But with a database it should be the same.
Bye
Volker
Anonymous
Not applicable
Author

Hi,
great! thanks a lot!!
That works exactly as I wished. (with TOS 2.4, the flowToIterate icon changes)
The tFixedFlowInput component was the one I missed!!
The tNormalize doesn't seem to be useful for my needs as I can have several columns from the tFixedFlow. I only have to care about data conversion to String.
Integer.toString(row1.Id)
(String)globalMap.get("row1.Libelle")
I could also add a tJavaRow for intern data manipulation.
output_row.Id=input_row.Id;
output_row.Libelle= "<Hello>" + input_row.Libelle + "</Hello>";
If I could, I would just ask for another exemple when you have time: how can I use technical components tArray and tArryIn to deal with data storage for further purpose. I didn't manage to use tArrayIn to get back initial data stored in tArray.

Kind regards,
jnb
Anonymous
Not applicable
Author

Hi jnb,
I'm glad that I could help you. Concerning tArray I've to pass on that. I didn't used them before.
Bye
Volker