full_refresh
- Models
- Seeds
dbt_project.yml
models:
<resource-path>:
+full_refresh: false
models/<modelname>.sql
{{ config(
full_refresh = false
) }}
select ...
The configured model(s) will not full-refresh when dbt run --full-refresh
is invoked.
dbt_project.yml
seeds:
<resource-path>:
+full_refresh: false
The configured seed(s) will not full-refresh when dbt seed --full-refresh
is invoked.
Description
Optionally set a resource to always or never full-refresh.
- If specified as
true
orfalse
, thefull_refresh
config will take precedence over the presence or absence of the--full-refresh
flag. - If the
full_refresh
config isnone
or omitted, the resource will use the value of the--full-refresh
flag.
Note: The --full-refresh
flag also supports a short name, -f
.
This logic is encoded in the should_full_refresh()
macro.
Usage
Incremental models
Seeds
The columns of my seed changed, and now I get an error when running the `seed` command, what should I do?
Recommendation
Set full_refresh: false
for models of especially large datasets, which you would never want dbt to fully drop and recreate.
0