Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
I have below folder subfolder structure in Qlik Enterprise with AWS S3 Connection,
lib://Amazon_S3/year=2021/month=01/day=01/Filename.csv
lib://Amazon_S3/year=2021/month=01/day=02/Filename.csv
.
.
lib://Amazon_S3/year=2022/month=01/day=02/Filename.csv
.
.
lib://Amazon_S3/year=2023/month=03/day=07/Filename.csv
likewise almost 2 years data in such folder structure,
............................................................................................................
Below code is absolutely running fine for Excels and csv's but when we try this code with AWS S3 folder it is unable to read it as filelist is not supported for S3 Connection in Qlik Enterprise whereas it is supported in Qlik Saas.
Please help
Thanks
can you run the following code: or does this error right away?
let location= '';
for each vFile in Filelist('$(location)')
TRACE --- filename $(vFile) exists ---;
next
if this doesn't work a workaround would be to read in the first line of all the files in that AWS dataconnection.
Sub Filechecker(vRoot,Files)
let Files= chr(39) & replace('$(Files)','|',chr(39) &','&chr(39)) & chr(39);
for each Exe in $(Files)
Output:
first 1
LOAD
FileName() as Filename,
FilePath() as Filepath,
FileTime() as Filetime,
'$(Exe)' as Type
FROM [$(vRoot)*.$(Exe)];
next
end sub
Call Filechecker('lib:/dataconnection/','qvd|xlsx');
here 'qvd|xlsx' you can add all file-extension like 'csv|xlsx|qvd|etc.'
this will loop to them all
hope this helps
Hi @MartW ,
Unfortunately its not working for sub directories ...
I don't know the aws but I would assume that this cloud is a web-site like other clouds (Onedrive, Googledrive). If so you couldn't use classical file-functions else you will need a connector: