Testing ZCQL Queries
As discussed in the introduction, you can test ZCQL queries from the console before implementing it in your application’s code. This enables you to test and verify the execution of queries before you begin building with it.
If your project’s Data Store is populated, you can perform operations on it from the ZCQL console to retrieve, insert, update, or delete data from the Data Store’s tables. You can view the output of the query executions on the same page.
ZCQL V2 Console
The Catalyst ZCQL V2 contains additional features and syntax upgrades, ensuring you have an easier experience in implementing the query language. These enhancements are only available in V2, which we recommend that you upgrade to, in order to perform querying operations with greater efficiency.
Currently, in the Catalyst console you will be able to access both V1 and V2 versions of ZCQL.
To switch between versions, you can click the drop-down icon in the top-right corner of the console and select your required version.
You will be directed to the V2 version by default.
To execute a ZCQL query in the Catalyst console:
- Navigate to Query Console under Storage in the Cloud Scale section of the console.
- Type the query in the ZCQL query window.
The output of your query’s execution will be displayed below the query window.
Using ZCQL V2 in Function Code
To use ZCQL V2 code in your function, you will need to set an environment variable for it in the following manner:
- Navigate to Serverless > Functions.
- Click the function that contains your ZCQL V2 code.
- Click the Configuration tab, then click Create Variable under Environmental Variables.
- Enter the following values in the respective fields:
Key: ZOHO_CATALYST_ZCQL_PARSER
Development Value: V2 - Click Save.
You will now be able to use ZCQL V2 in your function code.
-
You do not have to reference the environment variable anywhere in your code. Once you have configured it in the console, you can use ZCQL V2 in your function code.
-
We strongly recommend that you migrate your code to ZCQL V2, as V1 support will be completely stopped on Feb 29th, 2024.
Last Updated 2023-08-28 18:12:09 +0530 +0530
Yes
No
Send your feedback to us