Skip to content

Generate GraphViz ERD

1. Install GraphViz CLI

sudo apt install graphviz

Check installations for more details

2. Generate GraphViz ERD content

dbterd run -t graphviz -ad "samples/dbtresto" -s schema:dbt.mart 2023-05-06 08:17:54,413 - dbterd - INFO - Run with dbterd==?.?.? (main.py:54) 2023-05-06 08:17:54,715 - dbterd - INFO - target/output.graphviz (base.py:75)

2. Export to PNG

dot -Tpng ./target/output.d2 > ./target/output.png

3. Embeded into Markdown

# Sample GraphViz ERD

![graphviz](./target/output.png)

Sample Output:

graphviz