ZCQL

ZCQL is Catalyst’s own query language that enables you to perform data retrieval, insertion, updating, and deletion operations on the tables in the Catalyst Data Store. You can execute a variety of DML queries using ZCQL to obtain or manipulate data, and use various clauses and statements such as the SQL Join clauses, Groupby and OrderBy statements, and built-in SQL functions.

Execute ZCQL Queries

Catalyst also provides an OLAP database, in addition to the primary Data Store that is suited for analytical data retrieval queries. You can choose to execute simple transactional queries on the primary Data Store, and complex analytical queries that involve ZCQL functions on the OLAP database.

The queries that you execute on the primary Data Store can include SELECT, INSERT, UPDATE, or DELETE statements. 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 must construct a ZCQL query and pass it to the executeQuery() method for execution as shown in the sample code below.

The executeQuery() method supports these three parameters:

  • The String variable containing the constructed query statement
  • isV2?: A boolean value (true or false) indicating if it is a ZCQL v2 query
  • isOLAP?: A boolean value (true or false) indicating if the query needs to be executed on the OLAP database
copy
executeQuery(query: string, isV2?: boolean , isOLAP?:boolean)

A sample SELECT query is shown below. The response will contain the records you fetch using the SELECT query, or the response generated for the other operations.

Sample Code Snippet


Package Imports
copy
import com.zc.component.object.ZCRowObject; 
import com.zc.component.zcql.ZCQL;
copy
//Construct the query to be executed 
String query = "SELECT * from empDetails limit 10";
//Get the ZCQL instance and execute query using the query string
ArrayList  rowList = ZCQL.getInstance().executeQuery(query, true , false)

Last Updated 2026-02-16 20:32:46 +0530 IST