Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
SVM2020
Contributor
Contributor

How To connect a URL dynamically in the Load Script

Hi 

I have an API which will return me only 100 records at a time. in order to receive the next 100 records I have to use (URL)+(rec=101) which will get me next 100 rec. Similar way I have to collect all the data for the day and store them in a QVD to use in an app. The data source is a CSV file.

[Data_Extract]:

LOAD

  channel,

 agent,

record_number

FROM CSV (header on, delimiter ",", quote """") "Data_Extract" QDL

WITH CONNECTION (
url "$(resturl)""$(RecMax)",
QUERY "type" "CSV",
QUERY "size" "",
HTTPHEADER "auth_type" "token",
HTTPHEADER "token" "11111111111111111",
BODY "Post this");

I am  not getting the values correctly.

here resturl is the url and RecMax is the Max(Num_of_rec) from the QVD of first 100 records extracted manually.

I am not sure how to proceed on this.  Please give me some suggestion to proceed on the right direction.

   

 

1 Solution

Accepted Solutions
ToniKautto
Employee
Employee

I can not tell from you example how you increment the record position in the URL. 

Have you looked at any example like this,  on how to iterate over multiple URL requests during load?

https://community.qlik.com/t5/Qlik-Design-Blog/REST-connector-Using-WITH-CONNECTION/ba-p/1523257

View solution in original post

2 Replies
ToniKautto
Employee
Employee

I can not tell from you example how you increment the record position in the URL. 

Have you looked at any example like this,  on how to iterate over multiple URL requests during load?

https://community.qlik.com/t5/Qlik-Design-Blog/REST-connector-Using-WITH-CONNECTION/ba-p/1523257

SVM2020
Contributor
Contributor
Author

Thanks Tonikautto. It works.