...

/

Overriding Default Schema

Overriding Default Schema

Learn how to override the default dbt macro to generate the schema name.

How dbt generates schema name

When we tell dbt to run our model in other_dataset, it creates it in dbt_course_other_dataset.

Press + to interact
dbt creates a new dataset name
dbt creates a new dataset name

To decide in which dataset it should create the table, dbt looks at target_schema and custom_schema.

target_schema is the dataset in our profiles.yml file, whereas custom_schema is the one we specified in the config block above our model.

Here’s how dbt decides ...