11# dbterd
22
3- CLI to generate Diagram-as-a-code file ([ DBML] ( https://dbdiagram.io/d ) , [ Mermaid] ( https://mermaid-js.github.io/mermaid-live-editor/ ) , [ PlantUML] ( https://plantuml.com/ie-diagram ) , [ GraphViz] ( https://graphviz.org/ ) , [ D2] ( https://d2lang.com/ ) ) from dbt artifact files (required: [ ![ dbt] ( https://img.shields.io/badge/manifest.json-upto--v9 -3776AB.svg?style=flat&logo=dbt&logoColor=orange )] ( https://schemas.getdbt.com/ ) [ ![ dbt] ( https://img.shields.io/badge/catalog.json-upto--v1-3776AB.svg?style=flat&logo=dbt&logoColor=orange )] ( https://schemas.getdbt.com/ ) )
3+ CLI to generate Diagram-as-a-code file ([ DBML] ( https://dbdiagram.io/d ) , [ Mermaid] ( https://mermaid-js.github.io/mermaid-live-editor/ ) , [ PlantUML] ( https://plantuml.com/ie-diagram ) , [ GraphViz] ( https://graphviz.org/ ) , [ D2] ( https://d2lang.com/ ) ) from dbt artifact files (required: [ ![ dbt] ( https://img.shields.io/badge/manifest.json-upto--v10 -3776AB.svg?style=flat&logo=dbt&logoColor=orange )] ( https://schemas.getdbt.com/ ) [ ![ dbt] ( https://img.shields.io/badge/catalog.json-upto--v1-3776AB.svg?style=flat&logo=dbt&logoColor=orange )] ( https://schemas.getdbt.com/ ) )
44
55[ ![ PyPI version] ( https://badge.fury.io/py/dbterd.svg )] ( https://pypi.org/project/dbterd/ )
66![ python-cli] ( https://img.shields.io/badge/CLI-Python-FFCE3E?labelColor=14354C&logo=python&logoColor=white )
@@ -15,42 +15,46 @@ CLI to generate Diagram-as-a-code file ([DBML](https://dbdiagram.io/d), [Mermaid
1515 <a href="#" data-terminal-control="">restart ↻</a>
1616</div >
1717
18- Verify installed version :
18+ Verify installation :
1919
2020``` bash
2121dbterd --version
2222```
2323
2424## Quick examine with existing samples
2525
26- ``` bash
27- # select all models in dbt_resto
28- dbterd run -ad samples/dbtresto -o target
29- # select all models in dbt_resto, Select multiple dbt resources
30- dbterd run -ad samples/dbtresto -o target -rt model -rt source
31- # select only models in dbt_resto excluding staging
32- dbterd run -ad samples/dbtresto -o target -s model.dbt_resto -ns model.dbt_resto.staging
33- # select only models in schema name mart excluding staging
34- dbterd run -ad samples/dbtresto -o target -s schema:mart -ns model.dbt_resto.staging
35- # select only models in schema full name dbt.mart excluding staging
36- dbterd run -ad samples/dbtresto -o target -s schema:dbt.mart -ns model.dbt_resto.staging
37-
38- # other samples
39- dbterd run -ad samples/fivetranlog -o target
40- dbterd run -ad samples/fivetranlog -o target -rt model -rt source
41-
42- dbterd run -ad samples/facebookad -o target
43- dbterd run -ad samples/facebookad -o target -rt model -rt source
44-
45- dbterd run -ad samples/shopify -o target
46- dbterd run -ad samples/shopify -o target -rt model -rt source
47-
48- dbterd run -ad samples/dbt-constraints \
49- -a " test_relationship:(name:foreign_key|c_from:fk_column_name|c_to:pk_column_name)"
50-
51- # your own sample without commiting to repo
52- dbterd run -ad samples/local -o target -rt model -rt source
53- ```
26+ <details >
27+ <summary >Click me</summary >
28+
29+ ``` bash
30+ # select all models in dbt_resto
31+ dbterd run -ad samples/dbtresto
32+ # select all models in dbt_resto, Select multiple dbt resources
33+ dbterd run -ad samples/dbtresto -rt model -rt source
34+ # select only models in dbt_resto excluding staging
35+ dbterd run -ad samples/dbtresto -s model.dbt_resto -ns model.dbt_resto.staging
36+ # select only models in schema name mart excluding staging
37+ dbterd run -ad samples/dbtresto -s schema:mart -ns model.dbt_resto.staging
38+ # select only models in schema full name dbt.mart excluding staging
39+ dbterd run -ad samples/dbtresto -s schema:dbt.mart -ns model.dbt_resto.staging
40+
41+ # other samples
42+ dbterd run -ad samples/fivetranlog
43+ dbterd run -ad samples/fivetranlog -rt model -rt source
44+
45+ dbterd run -ad samples/facebookad
46+ dbterd run -ad samples/facebookad -rt model -rt source
47+
48+ dbterd run -ad samples/shopify -s wildcard:* shopify.shopify__*
49+ dbterd run -ad samples/shopify -rt model -rt source
50+
51+ dbterd run -ad samples/dbt-constraints -a " test_relationship:(name:foreign_key|c_from:fk_column_name|c_to:pk_column_name)"
52+
53+ # your own sample without commiting to repo
54+ dbterd run -ad samples/local -rt model -rt source
55+ ```
56+
57+ </details >
5458
5559## Quick DEMO
5660
0 commit comments