Execute Query

Construct the Query

You must construct a ZCQL query on the required dataset before you execute it. A sample SELECT query is shown below :

    
copy
#Construct the ZCQL query query = 'SELECT * FROM ShipmentData'

Execute the Query

The query object created in the step above is passed to the execute_query() method. The zcql_service reference used in the code snippet below is the component instance created earlier. Based on the query object being passed, the response returns a row object or an array of row objects.

To know more about the component instance zcql_service used below, please refer to this help section.

The response returned will contain an array of row objects.

Parameters Used

Parameter Name Data Type Definition
query String A Mandatory parameter. Will store the query to be executed.
    
copy
#Execute ZCQL query zcql_service = app.zcql() query = 'SELECT * FROM ShipmentData' result = zcql_service.execute_query(query)
Info : Refer to the SDK Scopes table to determine the required permission level for performing the above operation.

Last Updated 2025-03-28 18:24:49 +0530 +0530