full_refresh
The full_refresh config allows you to control whether a resource will always or never perform a full-refresh. This config overrides the --full-refresh command-line flag.
- Models
- Seeds
models:
<resource-path>:
+full_refresh: false | true
{{ config(
full_refresh = false | true
) }}
select ...
seeds:
<resource-path>:
+full_refresh: false | true
Description
The full_refresh config allows you to optionally configure whether a resource will always or never perform a full-refresh. This config is an override for the --full-refresh command line flag used when running dbt commands.
You can set the full_refresh config in the dbt_project.yml file or in a resource config.
| Loading table... |
Note
- The
--full-refreshflag also supports a short name,-f. - The
should_full_refresh()macro has logic encoded.
Usage
Incremental models
Seeds
Recommendation
-
Set
full_refresh: falsefor models of especially large datasets, which you would never want dbt to fully drop and recreate. -
You cannot override an existing
full_refreshconfig. To change its behavior in certain circumstances, remove the config logic or update it using variables so the behavior can be overridden when needed. For example, if you have an incremental model with the following config:{{ config(
materialized = 'incremental',
full_refresh = var("force_full_refresh", false)
) }}Then override the
full_refreshconfig totrueusing the--varsflag:dbt run --vars '{"force_full_refresh": true}'.
Reference docs
Was this page helpful?
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.