dbt-labs / dbt-labs/docs.getdbt.com
Add real example of customizing `generate_schema_name()` and `generate_database_name()` for common use cases
- Dominant language
- JavaScript
- Stars
- 215
- Forks
- 1.2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 130
Description
### Contributions
- [X] I have read the contribution docs, and understand what's expected of me.
### Link to the page on docs.getdbt.com requiring updates
https://docs.getdbt.com/docs/build/custom-schemas
https://docs.getdbt.com/docs/build/custom-databases
https://docs.getdbt.com/docs/build/custom-aliases
### What part(s) of the page would you like to see updated?
The pages are currently described separately and explain the concepts but they don't "bring it all together" to real use cases. Many people have questions about those macros and don't really know how to use them.
My idea would be to bring it all together and provide examples of those macros based on "database/schema" design chose by a company. Something like:
| Typical Use case | generate_database_name() | generate_schema_name() | generate_alias_name() |
|--------------------------------------------------------------------------------------------------------------------------|--------------------------|------------------------|-----------------------|
| (default) One schema per developer Custom schemas concatenated to the target schema | | | |
| One schema per developer Custom schemas not concatenated to the target schema in Prod Custom schemas concatenated in Dev | | (write example) | |
| One single schema for all developers Separating developers objects by adding user name to the table | | (write example) | (write example) |
| One database per developer | (write example) | (write example) | |
### Additional information
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.