About dbt_project.yml context
The following context methods and variables are available when configuring
resources in the dbt_project.yml
file. This applies to the models:
, seeds:
,
and snapshots:
keys in the dbt_project.yml
file.
Available context methods:
Available context variables:
Example configuration
dbt_project.yml
name: my_project
version: 1.0.0
# Configure the models in models/facts/ to be materialized as views
# in development and tables in production/CI contexts
models:
my_project:
facts:
+materialized: "{{ 'view' if target.name == 'dev' else 'table' }}"
0