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.

The zcql_service reference used below is already defined in the component instance page.

The response returned will contain an array of row objects.

    
copy
#Execute ZCQL query query = 'SELECT * FROM ShipmentData' result = zcql_service.execute_query(query)

Last Updated 2023-12-18 16:20:08 +0530 +0530