pre_clone
- Project YAML file
- Properties YAML file
- SQL file config
dbt_project.yml
models:
<resource-path>:
+state:
pre_clone: never | if_missing | always
models/<filename>.yml
models:
- name: my_model
config:
state:
pre_clone: never | if_missing | always
models/<filename>.sql
{{ config(
state={
"pre_clone": "never" | "if_missing" | "always"
}
) }}
Definition
pre_clone controls whether and when dbt State pre-populates incremental models and snapshots in your development environment by cloning their production counterparts before a run.
| Loading table... |
note
Non-incremental materializations are never pre-cloned. This setting has no effect on them.
Examples
Always sync development with production
Use always when you want development to reflect the current production state before every run:
models/fct_orders.yml
models:
- name: fct_orders
config:
state:
pre_clone: always
Isolate dev state from production
Use never when you want development to be fully independent from production:
dbt_project.yml
models:
+state:
pre_clone: never
Related docs
Was this page helpful?
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
0