Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Sep 28, 2023 4:18:23 AM
Mar 28, 2022 3:31:10 AM
Qlik Web Connectors support OData v4.0 and responses in JSON format. The support was introduced in the standalone connectors at the March 2022 release (2.122.1).
This article documents a how-to scenario for the Standalone Qlik Web Connectors. For an example using Qlik Cloud, see Using OData Connector with OData v4.0 JSON Messages with Qlik Web Connectors (Qlik Cloud).
Qlik Web Connectors March 2022 (2.122.1) and later
Qlik Sense Enterprise on Windows
Find the total revenue of each product from all orders using the example OData service: https://services.odata.org/V4/Northwind/Northwind.svc
The JsonV4ListResources table will return the available resources from your OData service.
You can use the values returned in the name column from the JsonV4ListResources table as the input to the OData Resource Path parameter on the JsonV4GetData table. For this example, we want to use the Orders resource.
The JsonV4GetData table will return the data from the resource specified in the OData Resource Path parameter.
“< JsonV4ListResources“
Note that collection valued properties are not returned by this table. A placeholder with the value “[Collection]” is returned instead. That data can then be retrieved by using the JsonV4GetDataCollection table. In cases where the collection values properties are also navigation properties, the placeholder that is returned is “[Collection]*”.
In this example, we want to obtain the data in the Order_Details collection for each order so we can calculate the total revenue by product. To do this we must use the metadata returned from the JsonV4GetData table and identify the following columns to be used as parameter values in the JsonV4GetDataCollection table:
The JsonV4GetDataCollection table will return the data from the OData collection specified in the OData collection column name parameter.
“< JsonV4GetData“
Paste the Qlik Web Connector OData script you copied above into your Qlik Sense Server app.
let vQwcConnectionName = ‘lib//QwcStandalone (your user)’;
JsonV4GetDataCollection_Order_Details_Product_ProductNameSum([JsonV4GetDataCollection_Order_Details_Quantity] * [JsonV4GetDataCollection_Order_Details_UnitPrice])