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
| Page | Description |
|---|
| Python SDK Overview | pip installation, version notes, and quick connection example |
| Python Database API Queries | PEP 249-compliant SQL execution interface supporting queries, writes, and transactions |
| Python Connector Usage Examples | Code examples for common scenarios: queries, writes, complex types, and batch operations |
| Python Connector Advanced Usage | Connection pooling, async queries, large result set handling, and error handling |
| SQLAlchemy Interface | ORM 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 Writes | Row-by-row streaming writes, suitable for scenarios requiring high data freshness |
| Python SDK Version History | Change history for each version of clickzetta-connector |
| Python SQLAlchemy Version History | Change history for each version of the SQLAlchemy plugin |
Comparison of Four Integration Methods
| Method | Use Case | Characteristics |
|---|
| Python Database API | SQL queries, data reads and writes | PEP 249 standard interface, highly versatile |
| SQLAlchemy | ORM, Pandas, BI toolchains | Declarative queries, seamless integration with the Python ecosystem |
| Bulkload | Large-scale historical data import | Writes to object storage first, then imports; high throughput |
| Real-time writes | Streaming data, high-frequency writes | Row-by-row commit, low latency |