Skip to main content

Sync dbt column descriptions ↔ Apache Superset 6.x datasets

Project description

dbt-superset-sync

PyPI version CI Python License: MIT

Sync dbt column descriptions, metrics, and labels ↔ Apache Superset 6.x datasets.

Built as a drop-in replacement for dbt-superset-lineage, with full Superset 6.x compatibility and MetricFlow support.

Features

  • Push dbt model/column descriptions, verbose_name labels, and metrics → Superset datasets
  • Pull published Superset dashboards → dbt exposures YAML
  • Create missing Superset datasets directly from dbt models (--create-missing)
  • Certify datasets with a certification badge in Superset (--certify)
  • MetricFlow support (dbt 1.6+ semantic layer) alongside the legacy calculation_method format
  • Column order from dbt YAML is preserved in Superset
  • --no-overwrite to protect manually edited fields in Superset
  • --tags, --schemas, --models filters for fine-grained control
  • init command to auto-detect all settings and write .env

Installation

pip install dbt-superset-sync

Quick start

# 1. Auto-detect everything and write .env
dbt-superset-sync init

# 2. Preview what would change
dbt-superset-sync push --dry-run

# 3. Push descriptions + create missing datasets
dbt-superset-sync push --create-missing

# 4. Discover dashboards and their dbt links
dbt-superset-sync pull --list

# 5. Export selected dashboards as dbt exposures
dbt-superset-sync pull

Configuration

All options can be set via environment variables or a .env file:

SUPERSET_URL=http://localhost:8088
SUPERSET_USERNAME=admin
SUPERSET_PASSWORD=your_password

DBT_MANIFEST=/path/to/target/manifest.json
DBT_EXPOSURES_OUTPUT=/path/to/models/marts/_exposures.yml

# Auto-detected by `init`
SUPERSET_DATABASE_ID=1
SUPERSET_SYNC_SCHEMAS=gold
SUPERSET_SYNC_MODELS=dim_post,fct_account_daily
SUPERSET_SYNC_DASHBOARDS=Sales Overview,Marketing KPIs

# Owner e-mail used when creating new Superset datasets (defaults to <username>@example.com)
SUPERSET_OWNER_EMAIL=you@example.com

Copy .env.example to get started:

cp .env.example .env

Push options

Flag Description
--dry-run Preview changes without writing
--create-missing Create Superset datasets for dbt models with no matching dataset
--no-overwrite Skip fields already filled in Superset
--certify Mark datasets as certified
--certified-by Certification author (default: dbt)
--certification-details Certification details text
--continue-on-error Continue on per-model errors instead of aborting
--schemas Filter by dbt schema (e.g. gold)
--models Filter by model name (e.g. dim_post,fct_account_daily)
--tags Filter by dbt tag (e.g. marketing)
--database-id Superset database ID for dataset creation

Column labels (verbose_name)

Add a meta.verbose_name to any dbt column — it will appear as the column label in Superset:

columns:
  - name: followers_count
    description: "Point-in-time follower count snapshot."
    meta:
      verbose_name: "Followers"

Metrics

dbt metrics (both legacy calculation_method and MetricFlow type/type_params) are pushed as Superset dataset metrics.

Supported aggregations: sum, count, average, count_distinct, ratio, derived.

Compatibility

Superset dbt Status
6.x 1.4 – 1.5 (legacy metrics)
6.x 1.6+ (MetricFlow)
< 4.x any ❌ (use dbt-superset-lineage)

Development

git clone https://github.com/plinxore/dbt-superset-sync.git
cd dbt-superset-sync
pip install -e ".[dev]"
pytest

See CONTRIBUTING.md for pull request guidelines.

License

MIT

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_superset_sync-0.1.1.tar.gz (15.2 kB view details)

Uploaded Source

Built Distribution

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

dbt_superset_sync-0.1.1-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file dbt_superset_sync-0.1.1.tar.gz.

File metadata

  • Download URL: dbt_superset_sync-0.1.1.tar.gz
  • Upload date:
  • Size: 15.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for dbt_superset_sync-0.1.1.tar.gz
Algorithm Hash digest
SHA256 08e477947d4f5c03989f0884a766a2ae7a6fbd8d101d55a90ce9b826a6681954
MD5 f3204ff2af69ab79e88532a9003bbb56
BLAKE2b-256 a6c97ac01b708f69147b43e8db22c05b8f080ca5afd8337e4e1c6f111769d4d9

See more details on using hashes here.

File details

Details for the file dbt_superset_sync-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for dbt_superset_sync-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8108d27e512035446bab9962e53afc23b750733bc86a2eeb929c44b211f25a6a
MD5 1a35fe79d47def07e4ba4bc6ac52e4fe
BLAKE2b-256 5d063f0594e4436ba85c9465c0ff79d82cc8438945f2983fe292d38833702caf

See more details on using hashes here.

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