Skip to main content

target_schema

info

For versionless dbt Cloud accounts and dbt Core v1.9+, this configuration is no longer required. Use the schema config as an alternative to define a custom schema while still respecting the generate_schema_name macro.

dbt_project.yml
snapshots:
<resource-path>:
+target_schema: string

snapshots/<filename>.sql
{{ config(
target_schema="string"
) }}

Description

The schema that dbt should build a snapshot table into. When target_schema is provided, snapshots build into the same target_schema, no matter who is running them.

On BigQuery, this is analogous to a dataset.

Default

Examples

Build all snapshots in a schema named snapshots

dbt_project.yml
snapshots:
+target_schema: snapshots

0