dbt-labs / dbt-labs/dbt

[CT-1301] Behavior change: `full_refresh: true` config should respect `--full-refresh, -f` flag

Open
#6,013 9 comments 0 reactions 0 assignees View on GitHub
engine:v1 incremental type:feature
Dominant language
Rust
Stars
13.8k
Forks
2.6k
Avg merge
21h 31m
Merged PRs (30d)
56

Description

https://docs.getdbt.com/reference/resource-configs/full_refresh

### Current behavior
When configured, `full_refresh: true|false` means: "always/never full-refresh, and always ignore the --full-refresh flag"

Added way back in https://github.com/dbt-labs/dbt-core/pull/2438 / v0.18

### Proposed change
- `full_refresh: true` should mean "always respect the --full-refresh flag"
- `full_refresh: false` should mean "never full refresh, under any circumstances"

That's trickier for intuition, and harder to explain, but definitely more desirable in terms of the behavior it enables. I'm not sure why you'd always want to full-refresh an `incremental` model; at that point it's really just a `table` materialization.

If this is set at the project level:
```yml
models:
+full_refresh: false
```
It's not possible to override that setting for one particular model ("actually I want this model to respect the `--full-refresh` flag"). This doesn't work as I'd hoped it might:
```sql
{{ config(materialized = 'incremental', full_refresh = none) }}
```

### Is this a breaking change?

Only for people who currently make use of `full_refresh: true`. Again, I'm not actually sure what the use case for doing that would be!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.