dbt-labs / dbt-labs/dbt-docs

Create ERD from relationships in schema.yml files

Open
#84 45 comments 177 reactions 0 assignees View on GitHub
triage
Dominant language
JavaScript
Stars
161
Forks
91
PR merge metrics
No merged PRs in 30d

Description

For complicated table relationships, it's nice to have an ERD (i.e. schema diagram) to help understand how everything fits together.

Schema.yml files already have relationship tests built into them that show the relationship between tables, so those could be parsed to get the data needed for the "keys," which may not actually be keys in most warehouse systems.

A first implementation of this functionality might just look at the schema.yml file and get any columns listed there so that only one data source is needed. A fuller implementation would get all columns from the tables.

Other thoughts:
* Integrating the descriptions that are in the schema.yml files would also be great, perhaps with a tooltip next to the table or column name
* If there are multiple schema.yml files in a project, it might be nice to color or box the tables that are known to be related to each other because they're in the same yml. Also would be nice to be able to filter for things in the same yml file. I think this is the nicest way to deal with being able to look at individual layers of a project, but would like someone else to think about that too
* Being able to zoom in/out and pan around like in the graph view would be a nice feature here

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.