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: 
Jim_O
Contributor II
Contributor II

Build Table with API in a Loop

Hello!

I am very close to getting this running, but at the moment my code leaves me with the required number of rows, but the same 500 or so rows repeated over and over.

Any pointer would be much appreciated.

Here's my code:

// recTotal already found by a previous query = 111,532;

Let startAt = 0;
Let pageSize = 500;


[ABS_Main]:
LOAD [@row.id],
[ID-ABS],
[Record Owner]
;


FOR startAt = 0 TO recTotal STEP pageSize

Concatenate

SQL SELECT
"@row.id",
"ID-ABS",
"Record Owner"
FROM JSON (wrap on) "root"
WITH CONNECTION(

URL "https://blah/blah/blah/select.json",
QUERY "offset" "$(startAt)",
QUERY "limit" "$(pageSize)"

);

NEXT startAt;

 

Thanks

Jim

 

Labels (1)
0 Replies