Merged
Conversation
…tation generation
…ow for ERD generation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds Entity Relationship Diagram (ERD) generation capabilities to the dbt project using the dbt-model-erd package. The implementation enables automatic generation of Mermaid UML diagrams from dbt model definitions and relationships, specifically for the star schema fact and dimension tables.
- Adds
dbt-model-erd>=0.1.1dependency for ERD generation - Updates model naming from single to double underscores (dim__users, fct__viewings)
- Modernizes GitHub Actions workflow to use
uvfor dependency management
Reviewed changes
Copilot reviewed 11 out of 14 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Adds dbt-model-erd dependency to project requirements |
| uv.lock | Updates lock file with dbt-model-erd package and related dependencies including newer platform-specific greenlet wheels |
| dbt/erd_config.yml | Configuration file for ERD generation with naming patterns, visualization settings, and Mermaid output options |
| dbt/models/mart/core/dim__users/dim__users.yml | Updates model name to double underscore convention and removes age range validation test |
| dbt/models/mart/core/dim__content/dim__content.yml | Updates model name to double underscore convention |
| dbt/models/mart/core/dim__devices/dim__devices.yml | Updates model name and adds incorrectly-directed relationship test |
| dbt/models/mart/core/dim__date/dim__date.yml | Updates model name, removes week_number range validation, and updates description |
| dbt/models/mart/core/fct__viewings/fct__viewings.yml | Updates model name and foreign key descriptions to match new naming convention |
| dbt/assets/img/mart/core/fct__viewings/fct__viewings_model.mmd | Generated Mermaid diagram source file for fact table ERD |
| dbt/assets/img/mart/core/fct__viewings/fct__viewings_model.html | Generated interactive HTML visualization with download capabilities |
| .github/workflows/publish-dbt-doc.yml | Modernizes workflow to use uv for dependency management and adds compile step before docs generation |
| debug_manifest.py | Adds debug script for inspecting dbt manifest structure |
| test.excalidraw.png | Test artifact that should not be committed |
| logs/dbt.log | Debug logs that should not be committed |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
dbt/assets/img/mart/core/fct__viewings/fct__viewings_model.html
Outdated
Show resolved
Hide resolved
…d enhance README with ERD generation instructions
…nd copy files to maintain relative links
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR simply add a way to generate a EDR (UML) schema directly from dbt models.
It's useful here to generate a proper Mermaid UML schema of Fact and Dim tables.
To use it simply do :
cd dbtpython -m dbt_erd --model-path models/mart --config erd_config.yml