dbml icon indicating copy to clipboard operation
dbml copied to clipboard

Ability to include other dbml files

Open lucianokrebss opened this issue 5 years ago • 3 comments

Hey guys,

Thank you for your awesome project. DBML is making a huge difference here at @provicapital. We are documenting our production database using db_docs and we thought it would be really great to have an import/export syntax function to make the database.dbml a little more modular, you know?

Thank you for your amazing work

lucianokrebss avatar Aug 01 '20 20:08 lucianokrebss

Hi @lucianokrebs, thank you for your compliment!

Could you share a little bit more on what do you mean by import/export syntax function please? Is it like module systems?

Something like below?

# File database.dbml
Include users.dbml
Include transactions.dbml

nvquanghuy avatar Aug 03 '20 03:08 nvquanghuy

Hey there - we're evaluating this at TS, and think we'd also benefit from this kind of functionality. We're thinking of using this to document our databases, as well as our data pipelines.

We have hundreds of tables, with many teams and maintainers, so 1 .dbml file seems like it would get a bit out of hand. There are a few central (maybe derived, in the case of a DP) tables that glue it all together that everyone needs access to. We'd like to document those independently, and then "export" the documentation to be consumed by various teams in their own DBML. For example: We're a business network, so lots of teams rely on a "companies" table. We don't want everyone inventing their own definitions of what a companies table is, but rather import @ts/companies & be able to reference the data. If we started using dbdocs.io alongside it, we wouldn't want multiple dbml files to end up creating many copies of the same table, either.

+1 for this!

lloydhumphreys avatar Jul 16 '21 12:07 lloydhumphreys

hello, any update for this? i think i need this too..

asule90 avatar Dec 18 '23 11:12 asule90