dbt-clickzetta
The dbt adapter for ClickZetta Lakehouse.
Installation
# SQL models only (default)
pip install dbt-clickzetta
# Python models (requires ZettaPark)
pip install "dbt-clickzetta[python]"
Requires Python 3.10+ (3.12 recommended) and dbt-core 1.8+.
Note on versions: The legacy
dbt-clickzetta 0.2.xseries requires dbt-core ~1.5 and is no longer maintained. Usedbt-clickzetta >= 1.6.
Quickstart
1. Configure profiles.yml
my_project:
target: dev
outputs:
dev:
type: clickzetta
service: cn-shanghai-alicloud.api.clickzetta.com
instance: your_instance
workspace: your_workspace
username: your_username
password: your_password
schema: your_schema
vcluster: default
query_tag: "dbt_{{ target.name }}" # optional
2. Test connection
dbt debug
3. Run your project
dbt run
dbt test
dbt docs generate
See the examples/ directory for complete, runnable examples.
→ 完整功能文档
Supported Features
| Feature | Description | Docs |
|---|---|---|
table / view / ephemeral |
Standard dbt materializations | materializations.md |
incremental |
Incremental load: merge / append / insert_overwrite / delete+insert | incremental.md |
dynamic_table |
Auto-refresh on schedule, no manual scheduling needed | dynamic-table.md |
materialized_view |
Pre-computed aggregation view | materializations.md |
snapshot |
SCD Type 2 history tracking | snapshots.md |
clone |
Zero-copy clone + Time Travel clone | clone.md |
| Python models | Run Python/ML models via ZettaPark | python-models.md |
| Table Stream | CDC source: capture INSERT/UPDATE/DELETE | table-stream.md |
| Indexes | Bloomfilter / Inverted / Vector indexes | materializations.md |
| Partitioned & clustered tables | Partition by column, cluster by bucket | materializations.md |
persist_docs |
Sync model/column descriptions to Lakehouse | — |
on_schema_change |
Handle schema drift in incremental models | incremental.md |
grants |
Column/table-level access control | — |
| VCluster per-model | Assign compute cluster per model | incremental.md |
query_tag |
Tag all queries for job history filtering | observability.md |
query_comment |
Auto-inject dbt metadata into every SQL (on by default) | observability.md |
| Utility macros | optimize, undrop, clone, refresh, etc. | utility-macros.md |
Connection Parameters
| Parameter | Required | Description |
|---|---|---|
type |
✅ | Must be clickzetta |
service |
✅ | API endpoint, e.g. cn-shanghai-alicloud.api.clickzetta.com |
instance |
✅ | Instance name |
workspace |
✅ | Workspace name |
username |
✅ | Username |
password |
✅ | Password |
schema |
✅ | Default schema |
vcluster |
✅ | VCluster name, e.g. default |
connect_retries |
❌ | Connection retry count (default: 3) |
query_tag |
❌ | Tag applied to every query; visible in job history |
Development
git clone https://github.com/clickzetta/dbt-clickzetta.git
cd dbt-clickzetta
pip install -e .
# Unit tests (no connection required)
pytest tests/unit/
# Functional tests (requires a real Lakehouse connection)
cp test.env.example test.env
# Fill in test.env with your connection details
pytest tests/functional/
License
Apache 2.0
Metadata
Release files for dbt-clickzetta 1.7.13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dbt_clickzetta-1.7.13.tar.gz | 38.2 kB | With provenance | Details for dbt_clickzetta-1.7.13.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dbt_clickzetta-1.7.13-py3-none-any.whl | Python 3 | none | any | Details for dbt_clickzetta-1.7.13-py3-none-any.whl |
Total release size: 85.7 kB
Release files / dbt_clickzetta-1.7.13.tar.gz
| Download URL | dbt_clickzetta-1.7.13.tar.gz |
|---|---|
| Size | 38.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
417652637ae47962bdd569e3aac84c615242636d132c0bcdea6d26d7d4e24e7a
|
|
BLAKE2b-256 checksum How to use checksums |
c606a74ff622dd4028f5d676db6187d038406ba4fa464e72e1435420340038f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 16, 2026.
Transparency logRelease files / dbt_clickzetta-1.7.13-py3-none-any.whl
| Download URL | dbt_clickzetta-1.7.13-py3-none-any.whl |
|---|---|
| Size | 47.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1979f6c5e4de2ac05cfcb98c95dd2e27167b41428025a276b56e1b31235c8f58
|
|
BLAKE2b-256 checksum How to use checksums |
b4f00daca65e92daa63af94f4670ddbdfd73268be0ffc620f06fe1a1f00aafd6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 16, 2026.
Transparency logSecurity for dbt-clickzetta 1.7.13
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for dbt_clickzetta-1.7.13.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 16, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.