Skip to main content

CLI to generate ERD Diagram file from dbt artifact files

Project description

dbterd

CLI to generate Diagram-as-a-code file (DBML, Mermaid, PlantUML, GraphViz, D2) from dbt artifact files (required: dbt dbt)

PyPI version python-cli License: MIT python codecov

pip install dbterd --upgrade

Verify installation:

dbterd --version

Quick examine with existing samples

Click me
# select all models in dbt_resto
dbterd run -ad samples/dbtresto
# select all models in dbt_resto, Select multiple dbt resources
dbterd run -ad samples/dbtresto -rt model -rt source
# select only models in dbt_resto excluding staging
dbterd run -ad samples/dbtresto -s model.dbt_resto -ns model.dbt_resto.staging
# select only models in schema name mart excluding staging
dbterd run -ad samples/dbtresto -s schema:mart -ns model.dbt_resto.staging
# select only models in schema full name dbt.mart excluding staging
dbterd run -ad samples/dbtresto -s schema:dbt.mart -ns model.dbt_resto.staging

# other samples
dbterd run -ad samples/fivetranlog
dbterd run -ad samples/fivetranlog -rt model -rt source

dbterd run -ad samples/facebookad
dbterd run -ad samples/facebookad -rt model -rt source

dbterd run -ad samples/shopify -s wildcard:*shopify.shopify__*
dbterd run -ad samples/shopify -rt model -rt source

dbterd run -ad samples/dbt-constraints -a "test_relationship:(name:foreign_key|c_from:fk_column_name|c_to:pk_column_name)"

# your own sample without commiting to repo
dbterd run -ad samples/local -rt model -rt source

Quick DEMO

Check Quick Demo out! And, following is the sample result using dbdocs:

screencapture-dbdocs-io-datnguye-poc-2023-02-25-10_29_32.png

Contributing ✨

If you've ever wanted to contribute to this tool, and a great cause, now is your chance!

See the contributing docs CONTRIBUTING for more information.

Finally, super thanks to our Contributors:

Project details


Release history Release notifications | RSS feed

This version

1.9.2

Download files

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

Source Distribution

dbterd-1.9.2.tar.gz (22.1 kB view details)

Uploaded Source

Built Distribution

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

dbterd-1.9.2-py3-none-any.whl (33.6 kB view details)

Uploaded Python 3

File details

Details for the file dbterd-1.9.2.tar.gz.

File metadata

  • Download URL: dbterd-1.9.2.tar.gz
  • Upload date:
  • Size: 22.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.1 Linux/6.2.0-1019-azure

File hashes

Hashes for dbterd-1.9.2.tar.gz
Algorithm Hash digest
SHA256 8abda67de0fff667a7c26ab5c326c81db853a25ec0a263439d65fc7ca036c3f8
MD5 0466761e4c1b8c6b3a62fd0b85f3b4f8
BLAKE2b-256 dea11803e6626e3cfd81f8ac80737ecc470b21ccc2f8680243f6a2a96940abde

See more details on using hashes here.

File details

Details for the file dbterd-1.9.2-py3-none-any.whl.

File metadata

  • Download URL: dbterd-1.9.2-py3-none-any.whl
  • Upload date:
  • Size: 33.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.1 Linux/6.2.0-1019-azure

File hashes

Hashes for dbterd-1.9.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0f94ffab614dc57dd65cb0d43e0bc56720100e8aa994860cd6e0fae53d34538d
MD5 bd6400126c723ca3f291fa0fca66d93f
BLAKE2b-256 21124c21ef5f094bbb206c8b6f0798dc3dcbfd0005ec2e9ec865f38cb3f9a234

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