ClickZetta Connector Official Python SDK
clickzetta-connector is the official Python SDK for Singdata ClickZetta Lakehouse, providing a database API call interface that follows the PEP-249 specification and bulk data upload (bulkload) functionality. With this SDK, you can easily interact with ClickZetta in Python applications.
Installation
Install clickzetta-connector using pip:
Quick Start
Execute SQL Query
Below is a simple example demonstrating how to use clickzetta-connector to execute an SQL query:
| Parameter | Required | Description |
|---|---|---|
| username | Y | Username |
| password | Y | Password |
| service | Y | Address to connect to the lakehouse, region.api.singdata.com. You can see the JDBC connection string in Lakehouse Studio Management -> Workspace![]() |
| instance | Y | You can see the JDBC connection string in Lakehouse Studio Management -> Workspace to view ![]() |
| workspace | Y | Workspace in use |
| vcluster | Y | VC in use |
| schema | Y | Name of the schema to access |
Simple Query Example
Using SQL hints
In JDBC, SQL hints set through the set command can be passed via the parameters parameter. For supported parameters, refer to Parameter Management. Below is an example:
More Examples
1. Handling Query Results
The following example demonstrates how to handle query results, such as saving the results to a CSV file:


