diff --git a/.changes/unreleased/Docs-20231106-123157.yaml b/.changes/unreleased/Docs-20231106-123157.yaml new file mode 100644 index 00000000000..28b4cd8e755 --- /dev/null +++ b/.changes/unreleased/Docs-20231106-123157.yaml @@ -0,0 +1,6 @@ +kind: Docs +body: fix get_custom_database docstring +time: 2023-11-06T12:31:57.525711Z +custom: + Author: LeoTheGriff + Issue: "9003" diff --git a/core/dbt/include/global_project/macros/get_custom_name/get_custom_database.sql b/core/dbt/include/global_project/macros/get_custom_name/get_custom_database.sql index bb9b8c23807..108dc494404 100644 --- a/core/dbt/include/global_project/macros/get_custom_name/get_custom_database.sql +++ b/core/dbt/include/global_project/macros/get_custom_name/get_custom_database.sql @@ -2,8 +2,7 @@ Renders a database name given a custom database name. If the custom database name is none, then the resulting database is just the "database" value in the specified target. If a database override is specified, then - the resulting database is the default database concatenated with the - custom database. + the custom database name is used instead of the default "database" value. This macro can be overriden in projects to define different semantics for rendering a database name. @@ -13,6 +12,7 @@ node: The node the database is being generated for #} + {% macro generate_database_name(custom_database_name=none, node=none) -%} {% do return(adapter.dispatch('generate_database_name', 'dbt')(custom_database_name, node)) %} {%- endmacro %}