Execute Query
zcql refers to the component instance defined here. This will return a promise which will be resolved to an object. The content key will contain the array of row objects.
Construct and Execute the Query on the Primary Data Store
For the ZCQL queries to be executed on the primary Data Store, you can construct the query and pass it to the executeZCQLQuery() method as shown below. These queries can include SELECT, INSERT, UPDATE, or DELETE statements.
A sample INSERT query is shown below:
//Construct the query to execute
let query = 'INSERT into ShipmentData (productID, productName, region) VALUES (3782, A4 Reams, India)';
let result = await zcql.executeZCQLQuery(query);
Construct and Execute the Query on the OLAP Database
The queries that you execute on the OLAP database must only include the SELECT statement, as direct write operations on it are not allowed. You can construct the query object and pass it to the executeOLAPQuery() method. A sample analytical SELECT query is shown below.
//Construct the query to execute
let query = 'SELECT SUM(price) FROM ShipmentData';
let result = await zcql.executeOLAPQuery(query);
Last Updated 2026-02-16 20:32:46 +0530 IST
Yes
No
Send your feedback to us