I have the following script:
LIB CONNECT TO 'REST_sample_connection';
for j = 0 to 10
Let vID = peek('ID', $(j), 'Data_Details');
RestConnectorMasterTable:SQL SELECT (I removed the details here as they are not important). ...FROM JSON (wrap on) "root" PK "__KEY_root"WITH CONNECTION (URL "https://api-sample.com/sample/sample",QUERY "filter" "detail.id eq '$(vID)'",HTTPHEADER "Authorization" "Bearer $(vToken)");
DROP TABLE RestConnectorMasterTable;
Data_Details is a table I load before that, which has a field with 10 IDs. What I want to do in the script above is to perform the above load with a filter on each of these 10 IDs. Any ideas why my script doesn't work?
What is the error that you get when you try to load the script?
No error, but it just doesn't load anything from this table where I apply the logic above.
If I put a specific ID instead of the variable in the filter, it works with no issue.
Any ideas what might be done wrongly in the above logic?
The issue might be that the filter needs a number rather than a string, try this instead:
QUERY "filter" "detail.id eq $(vID)",