Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
pauldamen
Partner - Creator II
Partner - Creator II

Make URL in WITH CONNECTION dynamic

All,

I have a JSON load script with an URL. I need to make the URL dynamic in order to change the skip and take.

First step is that I tried to create a variable with the link. But that doesn't seem to work, whatever I try; in the WITH CONNECTION it doesn't seem to recognize my variable. How you guys can help me out.

REgards, Paul

let vURL =  "https://xxxx.nl/xxxxx/connectors/xxxxx?skip=0&take=5000"

RestConnectorMasterTable:

SQL SELECT

"__KEY_root",

(SELECT

...,

...,

...

  "__FK_rows"

FROM "rows" FK "__FK_rows")

FROM JSON (wrap on) "root" PK "__KEY_root"

WITH CONNECTION (url $(vURL));

1 Reply
Stellan_Ronnkvist
Partner - Contributor III
Partner - Contributor III

Hello Paul,

I managed to change the URL like this by adding " " around the URL variable:

//Build new URL.

LET vURL = 'https://api.www.abc.com/external/folder/folder/data/login?accesskey=123;

RestConnectorMasterTable:

SQL SELECT

"__KEY_root",

(SELECT

...

  "__FK_rows"

FROM "rows" FK "__FK_rows")

FROM JSON (wrap on) "root" PK "__KEY_root"

WITH CONNECTION

( URL "$(vURL)");


Regards,

Stellan