Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
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