datnguye / dbterd

Generate the ERD as a code from dbt artifacts

Home Page:https://dbterd.datnguyen.de/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow multiple sections using -s and -ns flags, or regex pattern

whichwit opened this issue · comments

Is your feature request related to a problem? Please describe.
Sometimes the naming convention of the model alone is not enough to use a single -s or -ns to get desired selection.

Describe the solution you'd like
Allow multiple sections using -s and -ns flags, or regex pattern

Describe alternatives you've considered
Generate all models then manually edit.

Thanks @whichwit
Regarding to Regex stuff, I'm thinking to use Unix style instead, by using fnmatch. What do you think?

I think we can just inherit dbt --select , instead of using the Regex

The goal is to be able to filter the interested models. I'd think matching dbt syntax would be very natural (+1 for its support for downstream dependency selection). With the latest addition of -rt flag I'm actually able to accomplish this by putting the public models under a designated schema, which fits the business case as well.

I think we can just inherit dbt --select , instead of using the Regex

Agree, and dbt v1.5 introducing wildcard selector following unix style, and it's using fnmatch module for it

Hi @whichwit

I'd think matching dbt syntax would be very natural (+1 for its support for downstream dependency selection)

I agree that it's great if we can mimic dbt selection syntax, but I'm considering that this feature is kind of overkilled for this tool - dbterd, it doesn't make sense to show non-related models (in term of relationships) for the up/downstream layers in the ERD unless you could help to describe more details about the use case. Thanks

Currently, I beleive the wildcard and multiple selections are now good enough to serve many of use cases. Therefore, I will suggest to move this particular feature into another issue if you would still want it happen.

Agreed. Allow multiple selection alone will help a ton, to filter down relevant asset. Thank you for making the changes quickly, can't wait to try Mermaid.