Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
ahmad_yar
Contributor
Contributor

Reading csv file path from api response JSON

Hi,

I am using connector to make API call. The API call returns this response as JSON:

{"output_file": "https://rmf-bucket.s3.amazonaws.com/media/user_1/output-sample.csv"}

I want to get the "output_file" path which is a CSV file and load its content.

Thanks in advance

Labels (2)
3 Replies
ajaykakkar93
Specialist III
Specialist III

hi,

You can do this by the below method.

   using web connector get the above file data & store in a variable 
   now use the url stored in variable & just do a load * with url using web connector data will load

Please mark the correct replies as Solution. Regards, ARK
Profile| GitHub|YouTube|Extension|Mashup|Qlik API|Qlik NPrinting

ahmad_yar
Contributor
Contributor
Author

Hi @ajaykakkar93 ,

Thanks for the response, I am new to qlik and I am confused about how to add the second connector which will read data from CSV. It will be great if you can provide snippet. Currently, I am using this snippet:

LIB CONNECT TO 'Gedeelde Omgeving:REST_http52.49.233.78apiv1rfm-latest';

RestConnectorMasterTable:
SQL SELECT
"output_file"
FROM JSON (wrap on) "root";

[root]:
LOAD [output_file]
RESIDENT RestConnectorMasterTable;

LET vOutput = peek('output_file', 0, 'root');
SET Output = $(vOutput);

LOAD * FROM $(Output)
ajaykakkar93
Specialist III
Specialist III

Hi

in LOAD * FROM $(Output). You will get the url now just load the url using qlik web connector 

 

Please mark the correct replies as Solution. Regards, ARK
Profile| GitHub|YouTube|Extension|Mashup|Qlik API|Qlik NPrinting