Skip to main content

target_schema

info

Starting in dbt Core v1.9+, this functionality is no longer utilized. Use the database config as an alternative to define a custom database while still respecting the generate_database_name macro.

Try it now in the dbt Cloud "Latest" release track.

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 tableIn simplest terms, a table is the direct storage of data in rows and columns. Think excel sheet with raw values in each of the cells. 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

In dbt Core v1.9+ and dbt Cloud "Latest" release track, this is not a required parameter.

Examples

Build all snapshots in a schema named snapshots

dbt_project.yml
snapshots:
+target_schema: snapshots

0