Giter Club home page Giter Club logo

dbterd's Introduction

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:

dbterd's People

Contributors

datnguye avatar oracen avatar lvarley avatar yingyingqiqi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.