Skip to main content

The ClickZetta adapter plugin for dbt

Project description

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.x series requires dbt-core ~1.5 and is no longer maintained. Use dbt-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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dbt_clickzetta-1.7.12.tar.gz (38.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dbt_clickzetta-1.7.12-py3-none-any.whl (47.3 kB view details)

Uploaded Python 3

File details

Details for the file dbt_clickzetta-1.7.12.tar.gz.

File metadata

  • Download URL: dbt_clickzetta-1.7.12.tar.gz
  • Upload date:
  • Size: 38.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dbt_clickzetta-1.7.12.tar.gz
Algorithm Hash digest
SHA256 49f1549c8f1abcea13b556036b5800d43a71a081e81a0604aa64740d78b9f6c3
MD5 c1d17240abe6e79e31a3aad15511259a
BLAKE2b-256 a25ffb9faba83f31ecc9be5e19f35c15051f99d1ad94847d1014b067b294d0fe

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbt_clickzetta-1.7.12.tar.gz:

Publisher: release.yml on clickzetta/dbt-clickzetta

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dbt_clickzetta-1.7.12-py3-none-any.whl.

File metadata

  • Download URL: dbt_clickzetta-1.7.12-py3-none-any.whl
  • Upload date:
  • Size: 47.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dbt_clickzetta-1.7.12-py3-none-any.whl
Algorithm Hash digest
SHA256 1b2d98d7a3f94639f9e0cf50f686e6ba259eebbfd3cc753c8efc11544e0bc6e8
MD5 0be072dbb33a5ebfe6946aed93696f3d
BLAKE2b-256 bf5d19028f1086c6157019569887996294fe14e47a031f1b12d89295c864f47c

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbt_clickzetta-1.7.12-py3-none-any.whl:

Publisher: release.yml on clickzetta/dbt-clickzetta

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page