Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to use dataflow to load the data from my data connection,
I need to load all data from a folder but i couldn't find any option to iterate or loop through all files in a folder.
Could you please tell me the steps to loop all files or give me the help link for this topic
Thanks,
John.
Hi
I think there is no built in folder iteration but you can try this in script
For Each vFile in FileList('lib://MyFolder/*.csv')
LOAD *
FROM [$(vFile)]
(txt, utf8, embedded labels, delimiter is ',');
Next
Hi @John_Peter ,
Thanks for raising this. As @dchan pointed out, native folder iteration isn't available directly as a no-code node in Data Flow today. You can achieve it via the Qlik script processor, which can be used as a source in your data flow. It supports a FOR EACH ... IN FileList() loop to load all files from a folder. See the docs: Qlik Help | Qlik script processor
To point you to the right approach: what type of connection are the files coming from (e.g. Qlik Cloud data files, SharePoint, cloud storage)? And do you want to automatically concatenate all files into a single dataset (assuming they share the same schema), or is there more complex logic involved, e.g. using variables to handle varying structures or filenames?
There's also an existing ideation open for native loop support in Data Flow. I'd encourage you to upvote it here, since votes and use cases like yours directly inform prioritization:
👉 Qlik Ideation | Loops in Data Flow
Best regards,
--
Olivier (Product Manager, Data Preparation @ Qlik)