Python SDK

clickzetta-connector is the official Python SDK for Singdata Lakehouse. It follows the PEP 249 specification and provides four integration methods: SQL queries, SQLAlchemy ORM, bulk writes (Bulkload), and real-time streaming writes. Python 3.7 and above is supported.


Contents

PageDescription
Python SDK Overviewpip installation, version notes, and quick connection example
Python Database API QueriesPEP 249-compliant SQL execution interface supporting queries, writes, and transactions
Python Connector Usage ExamplesCode examples for common scenarios: queries, writes, complex types, and batch operations
Python Connector Advanced UsageConnection pooling, async queries, large result set handling, and error handling
SQLAlchemy InterfaceORM framework integration, suitable for Pandas and data analysis toolchains
Bulk Data Upload (Bulkload)High-throughput bulk writes, suitable for large-scale historical data import
Real-time Data WritesRow-by-row streaming writes, suitable for scenarios requiring high data freshness
Python SDK Version HistoryChange history for each version of clickzetta-connector
Python SQLAlchemy Version HistoryChange history for each version of the SQLAlchemy plugin

Comparison of Four Integration Methods

MethodUse CaseCharacteristics
Python Database APISQL queries, data reads and writesPEP 249 standard interface, highly versatile
SQLAlchemyORM, Pandas, BI toolchainsDeclarative queries, seamless integration with the Python ecosystem
BulkloadLarge-scale historical data importWrites to object storage first, then imports; high throughput
Real-time writesStreaming data, high-frequency writesRow-by-row commit, low latency

DocumentDescription
Zettapark Quick StartPython DataFrame API for operating Lakehouse data in a Spark-style manner
SQLAlchemyDetailed SQLAlchemy connection configuration
Bulk Data Upload with Python SDKComplete Bulkload practice example