{"repo":"DJLemkes/dbt-diagrams","free":true,"listed":false,"github":"https://github.com/DJLemkes/dbt-diagrams","clone":"git clone https://github.com/DJLemkes/dbt-diagrams.git","description":"Generate an ERD from your dbt project model config.","language":"Python","stars":34,"topics":["data","data-model","dbt","erd","mermaid"],"license":"MIT","category":"data-pipelines","readme_excerpt":"dbt-diagrams This tool allows you to 1. generate an Entity Relationship Diagram (ERD) based on meta config in your dbt model docs. Currently it relies on Mermaid to render the output. You can choose to render your output inside your dbt docs directly, or store it as a separate SVG image. 1. Enable general Mermaid rendering capabilities to your dbt docs. Every Markdown code block tagged with mermaid will be rendered. [!TIP] Read the blog post for more details [!TIP] Demo Jaffle Shop docs pages Installation instructions As dbt-diagrams is just a Python package. Install it using your favourite Python package manager (e.g. pip install dbt-diagrams ). In case you want to render your ERD to a SVG image, you will have to install the dbt-diagrams[svg] extras package as well. Usage (1): add Mermaid rendering to dbt docs Simply run dbt-diagrams docs generate instead of dbt docs generate . Any Markdown code block tagged with mermaid will now be picked up and rendered as an image. Usage (2): specify ERD in meta blocks and render in dbt docs This will achieve the same functionality as (1), plus the following: let's say you have the following models defined in your dbt project mermaid[erd=\"customer erd\"] mermaid[erd=\"customer erd\"] Using the meta section of a model, you can define ERD connections to other models. Based on these connections and other table attributes the ERD can be generated. The target attribute is another dbt model name. Accepted relation cardinalities are one , zero or o","default_branch":null,"files":null,"tree":[],"storefront":"/r/DJLemkes","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/DJLemkes/dbt-diagrams/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}