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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Bastifantasti1
Contributor
Contributor

File Naming with values of used variables

Hi all,

I would like to include the name of a variable in the name of the outputfile (XML).

In the job I am accessing an MySQL Database with multiple rows and generating 1 to n XML files, one file per row.

One row in the column is called deliverynumber. I would like to include its value (e.g. 12345) in the filename.

Could you please let me know if this is possible?

Maybe in a similiar way to include the date in the name.

Best regards

Bastian

Labels (2)
2 Replies
Anonymous
Not applicable

Hi

You need to iterate each row and set a dynamic file name, eg:

tMysqlInput--main(row1)--tFlowToIterate--tFixedFlowInput--tMap--tFileoutputXML

 

Take a look at the component documentation and learn tFlowToIterate component.

 

tFixedFlowInput: generate the current row, define the same schema as tMysqlInput, set the column value like:row1.columnName

 

on tFileOutputXML, set the file path like:

"D:/folder_path/"+(String)globalMap.get("row1.deliverynumber")+".xml"

 

Regards

Shong

 

 

 

 

 

 

 

 

 

 

 

 

 

Bastifantasti1
Contributor
Contributor
Author

Hi Shong, thanks for your Feedback - could you possible share a overview and order of used components in your described solution? I understand your last part but struggle to understand the part with the iteration. Best regards Bastian