Export Diagrams via dbdocs CLI

The ability to download the diagrams via dbdocs CLI.

Possible use cases / scenarios:

  • For automation of documentation updates.

If you want us to support this feature as well, please share your story and vote :small_red_triangle: this topic.

Request from @Jens

We use dbt to load our data warehouse. dbt is open source and increasingly popular for cloud data warehousing.
dbt generates database documentation and provides really nice data dependency graphs and comprehensive information on the tables. But, many properties like nullability, uniqueness and foreign key relationships are not immediately visible in the dbt documentation, they are expressed as tests on the data since there is no builtin support for them. We use dbdocs to visualize those properties.
I already have some automation for:

  • updating the column information from the database, keeping metadata in sync with the solution (switching to dbt-osmosis for that)
  • conversion between dbt yaml format and dbml
  • upload of dbml to dbdocs.
    So, the dbt generated documentation allows including external images.
    If we could automate extraction of the dbdocs graphics, I could automate the entire chain and have always up to date ER-diagrams included in the dbt documentation.
    description | dbt Developer Hub
    I’d be happy to package and open source the code for my dbt yaml-dbml conversions to the dbml community. (once it reaches some level of maturity and documentation, but that’s not far off)
1 Like

We use Notion for other documentation, I would consider tinkering with the Notion API to update ER-diagrams in there as well.
I think being able to automatically update all occurrences of an ER-diagram by maintaining only one dbml file has many uses.

I would like to see a CLI version to export diagrams as part of our CI/CD tool chain.