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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to generate target files dynamically at run time

Hi,
I have a source table/file with thousands of records, each record belongs one specific department, and number of department may grow.

and the requirement is to generate one file for each department and load corresponding data into that file, like that need to create files at run time depends on the number of department coming from the source.

Ex:

empid,name,deptid
100,a,10
200,b,20
300,c,10
400,d,40
500,c,30
600,e,10
700,f,40
800,g,20
as of now there are 4 different department from source file, so need to create 4 files at run time

FileName: file_10.txt File_20.txt
empid,name,deptid empid,name,deptid
100,a,10 200,b,20
300,c,10 800,g,20
600,e,10

like that need to create, and what are the components are required to implements this
Thanks

Labels (4)
1 Solution

Accepted Solutions
TRF
Champion II
Champion II

Does this help?
If so, thanks to mark your case as solved.

View solution in original post

3 Replies
TRF
Champion II
Champion II

tFileInputDelimited --> tFlowToIterate

|

(onSubjobOK)

|

tIterateToFlow --> tFileOutputDelimited

 

Use the following expression for the output filename :

"file_" + (Integer)globalMap.get("deptid") + ".txt"
TRF
Champion II
Champion II

Does this help?
If so, thanks to mark your case as solved.