Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
pratham39
Contributor III
Contributor III

Filelist is not supported in Qlik Enterprise for AWS S3 Connection

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.

pratham39_0-1679056548834.png

Please help 

Thanks

Labels (4)
3 Replies
MartW
Partner - Specialist
Partner - Specialist

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

pratham39
Contributor III
Contributor III
Author

Hi @MartW ,

Unfortunately its not working for sub directories ...

marcus_sommer

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:

Amazon S3 | Qlik Connectors Help