require_fresh_data_from
- Project YAML file
- Properties YAML file
- SQL file config
dbt_project.yml
models:
<resource-path>:
+state:
require_fresh_data_from: any | all
models/<filename>.yml
models:
- name: my_model
config:
state:
require_fresh_data_from: any | all
models/<filename>.sql
{{ config(
state={
"require_fresh_data_from": "any" | "all"
}
) }}
Definition
require_fresh_data_from controls how many direct parent nodes need fresh data before dbt State considers this node eligible for a rebuild. dbt State still looks for an object to reuse before triggering an actual rebuild.
| Loading table... |
Default
any
Examples
Require all parents to have fresh data
Use all for a model that joins multiple sources and should only rebuild when every upstream dependency has updated:
models/fct_orders.yml
models:
- name: fct_orders
config:
state:
require_fresh_data_from: all
Apply a project-wide default
dbt_project.yml
models:
+state:
require_fresh_data_from: all
Related docs
Was this page helpful?
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
0