Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Iterate through the date_key from a table and extract a file for each date_key from the same table

I have a request to extract a file for each date_key value from a big sales table.
There are about 1500 distinct date_key in this table.
I was asked to extract flat files from this table for each date_key and name them something like "date_key.sales.txt".
There might be gaps between date_keyS.

Any suggestions?
I also need to keep in mind the job might fail ( server down/power shutdown etc) during the extraction process, so I have to keep recovery in consideration.

Thanks!

Labels (3)
1 Reply
manodwhb
Champion II
Champion II

@Moe , first maintain a table to have distinct keys and flag column initially set to N

 

you read that table and iterate date key by key based on flag is Nand once the and pass to downstram generate a file from a table and write it to file once the file is generate successfully take the on component on anc connect to tDBrow and update date key flag to Y. when it read again and again it will get not processed daykeys.