Skip to content

Commit

Permalink
Update custom-schemas.md
Browse files Browse the repository at this point in the history
The [generate_schema_name_for_env](https://github.com/dbt-labs/dbt-adapters/blob/main/dbt-adapters/src/dbt/include/global_project/macros/get_custom_name/get_custom_schema.sql#L47-L60) macro uses the target.schema as a fallback when no custom schema is set. Updating the wording here to be a little more precise regarding how the marco functions.
  • Loading branch information
spencerdcarlson authored Feb 28, 2025
1 parent 08d13ea commit b86cbdd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion website/docs/docs/build/custom-schemas.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ See docs on macro `dispatch`: ["Managing different global overrides across packa

## A built-in alternative pattern for generating schema names

A common customization is to ignore the target schema in production environments, and ignore the custom schema configurations in other environments (such as development and CI).
A common customization is to use the custom schema in production when set, with the target schema serving only as a fallback if no custom schema is specified. In other environments, such as development and CI, custom schema configurations are ignored.

Production Environment (`target.name == 'prod'`)

Expand Down

0 comments on commit b86cbdd

Please sign in to comment.