Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
On Qlik Cloud, I have QVD files stored in subdirectories, themselves located in subdirectories of a data space. Is there a simple script loading syntax to dynamically browse this tree structure to retrieve certain QVDs? Thank you.
Best regards,
Hi @herard_bertrand ,
Yes, you can.
The code below returns every single file in a Space, no matter the subfolder:
For Each vFileName in FileList('lib://DVD Rental Snowflake (DATA-DEV):DataFiles/*')
FileList:
LOAD
'$(vFileName)' AS FileName
AutoGenerate(1)
;
Next vFileName
You can replace the * with any name pattern, for example:
For Each vFileName in FileList('lib://DVD Rental Snowflake (DATA-DEV):DataFiles/*FILM*')
FileList:
LOAD
'$(vFileName)' AS FileName
AutoGenerate(1)
;
Next vFileName
Returns
Regards,
Mark Costa
Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com
Hi @herard_bertrand ,
can you please clarify what you mean?
At which stage do you want to be able to browse the folders? In the data load editor? And what do you mean by "dynamically"?
Hi 🙂
I try to concatenate QVD with a specific name in data load editor.
By Browsing, in fact I mean to load every qvd with a specific name in a lot of folders and sub folders. By dynamically I mean to do this without knowing the exact name of each folder / subfolders.
Thanks
Hi @herard_bertrand ,
Yes, you can.
The code below returns every single file in a Space, no matter the subfolder:
For Each vFileName in FileList('lib://DVD Rental Snowflake (DATA-DEV):DataFiles/*')
FileList:
LOAD
'$(vFileName)' AS FileName
AutoGenerate(1)
;
Next vFileName
You can replace the * with any name pattern, for example:
For Each vFileName in FileList('lib://DVD Rental Snowflake (DATA-DEV):DataFiles/*FILM*')
FileList:
LOAD
'$(vFileName)' AS FileName
AutoGenerate(1)
;
Next vFileName
Returns
Regards,
Mark Costa
Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com
Thanks 👍