
Digital Support
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
REST connector: How to modify queryt URL, Parameters, Headers and Body using WITH CONNECTION command in the reload script
Last Update:
May 26, 2021 6:22:25 AM
Updated By:
Created date:
May 25, 2018 6:03:14 AM
The user can override connection paramters such as queryt URL, Parameters, Headers and Body using WITH CONNECTION command in the Select statement.
Environment:
The format is:
<select_stmt> WITH CONNECTION (<connection_item> {,<connection_item>})
connection_item = URL "new url" | QUERY "param name" "param value" | HTTPHEADER "header name" "header value" | BODY "request body text"
Example:
Set vURL="https://jsonplaceholder.typicode.com/comments";
Set vHeader="customer1";
Set vParam="?postId=1";
RestConnectorMasterTable:
SQL SELECT
"userId",
"id",
"title",
"body",
"postId",
"name",
"email"
FROM JSON (wrap on) "root"
WITH CONNECTION(
Url "$(vURL)$(vParam)",
QUERY "postId" "2",
QUERY "postId" "3",
HTTPHEADER "Cust-Header" "$(vHeader)"
);
5,967 Views