Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Improve documentation around best practices in defining groups #4788

Open
3 tasks done
james-johnston-thumbtack opened this issue Jan 20, 2024 · 0 comments
Open
3 tasks done
Labels
community Contributions from the dbt community enhancement Use to add new features to the docs

Comments

@james-johnston-thumbtack

Is this your first time submitting a feature request?

  • I have read the expectations for open source contributors
  • I have searched the existing issues, and I could not find an existing issue for this feature
  • I am requesting a straightforward extension of existing dbt functionality, rather than a Big Idea better suited to a discussion

Describe the feature

The documentation for defining groups at https://docs.getdbt.com/docs/build/groups only shows a single example of defining a group, deeply nested within models/marts/finance/finance.yml. My natural thought when actually laying out my project (as a dbt beginner) was that it would be best to centrally define the groups, so they can be reused across different model subdirectories. And the most natural place (I thought) to put that was dbt_projects.yml. But I wasn't sure if it was possible, or exactly how it should look, so I Googled and found the idea was considered and rejected in favor of some alternative practices: dbt-labs/dbt-core#8983

The rationale for rejection makes sense, but it leaves the existing documentation with room for improvement IMHO for answering this (I assume?) common question. I think there are multiple areas of documentation improvements that could be considered:

  • The above-linked issue suggests to place a _groups.yml file in the root of models, or alternatively in a groups directory that is included in model-paths. This would be useful to include as an example in the above-linked documentation for groups. I'm sure many people looking at that page wonder what the best way to centrally define groups would be?
  • The "How we structure our dbt projects" section doesn't mention groups at all. If there is a best practice to be defined here (and surely there is?) then this section of documentation could mention how to define groups. (For that matter, I don't think it even talks about access modifier best practices at all?)

Describe alternatives you've considered

No response

Who will this benefit?

Anyone new to dbt who wants to know the best practices for centrally defining a list of groups.

Are you interested in contributing this feature?

No response

Anything else?

No response

@james-johnston-thumbtack james-johnston-thumbtack added the enhancement Use to add new features to the docs label Jan 20, 2024
@dbeatty10 dbeatty10 transferred this issue from dbt-labs/dbt-core Jan 23, 2024
@matthewshaver matthewshaver added the community Contributions from the dbt community label Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Contributions from the dbt community enhancement Use to add new features to the docs
Projects
None yet
Development

No branches or pull requests

2 participants