Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
RP_Bingi
Contributor
Contributor

Reading multiple files from S3 bucket using REST connector string connection and WITH connection

Hi All, This is my post in community.

We are trying to read multiple files from S3 bukcet using REST connector and WITH connection ( URL );

I'm unable to get when I try with file in the filelist for reading multiple files 

 after connecting to rest connector, I am using the below script 


Let vFileType = 'txt';
trace $(vURLGetRawObjectAsText);
For each vFile in FileList('$(vURLGetRawObjectAsText)'&'*.'&'$(vFileType)')
Trace $(vFile);

Folder:
Load '$(vFile)' as TextFile AutoGenerate 1;
Next vFile

exit script;

for i = 1 to NoOfRows('Folder')

let vNew = peek('TextFile', $(i)-1,'Folder');

if '$(vFile)' <> '' THEN

Table:
SQL SELECT
"col_1",
"col_2",
from $(vNew) (header off, delimiter ",", quote """") "CSV_source"
WITH CONNECTION (
URL "$(vURLGetRawObjectAsText)"
);

ENDIF;

Next

EXIT SCRIPT;

 

when I'm reloading it is not entering into for loop and I'm not getting the Folder table which should contain folder names 

Please help me out what is wrong in script and pls let me know how to read multiple files with REST connector

@multiplefiles @qliksense @s3bucket @restconnector @withconnection

Labels (2)
0 Replies