dbt-labs / dbt-labs/docs.getdbt.com

Explain how to perform a full refresh on only a single model without forcing full refresh on all models

Open
#4,504 0 comments 0 reactions 0 assignees View on GitHub
content improvement
Dominant language
JavaScript
Stars
215
Forks
1.2k
Avg merge
1d 15h
Merged PRs (30d)
130

Description

### Contributions

- [X] I have read the contribution docs, and understand what's expected of me.

### To do

- [ ] Determine the suggested practices and approaches
- [ ] Figure out the best venue(s) to document and share these practices and approaches

### Link to the page on docs.getdbt.com requiring updates

_Potential_ pages to update:
- https://docs.getdbt.com/reference/resource-configs/full_refresh
- https://docs.getdbt.com/reference/commands/run#refresh-incremental-models
- https://docs.getdbt.com/reference/commands/build#details
- maybe somewhere else? 🤷

## What part(s) of the page would you like to see updated?

### Request for documentation

Explain how to perform a full refresh on only a single model without forcing full refresh on all models

### Background context

https://github.com/dbt-labs/dbt-core/issues/9082 was looking for an option to build all models, but to fully refresh only one of them.

While we aren't planning to add anything new at this time, https://github.com/dbt-labs/dbt-core/issues/9082#issuecomment-1815325953 outlines several ways to accomplish that goal with current capabilities.

## Potential options to document

### Option 3

This option only alters the source code -- it does not alter any of the commands.

https://github.com/dbt-labs/dbt-core/issues/9082#issuecomment-1815325953

If folks know about it, this option is the fastest way to accomplish the goal for local development.

It is also the easiest for production runs that have all their production commands in source control.

For folks that alter their production commands via a web interface or CLI rather than source control, Option 0 below may be preferable.

### Option 0

This option only alters the commands -- it does not alter any source code.

@aBBDnGus expressed preference of this option for their use-case [here](https://github.com/dbt-labs/dbt-core/issues/9082#issuecomment-1815882175).

The downsides of this approach is that it is long to type out and it is a one-off solution. i.e., if these commands are added to a production run, then the user would be better off using **Option 3** instead.

Since it doesn't require altering source code, this option is easier for folks that are using a web interface or CLI rather than source control for altering the commands executed during a production run.

## Additional information

### See also

These may be tangentially related:
- https://stackoverflow.com/questions/74550798/is-there-a-way-to-force-a-full-refresh-for-a-dbt-incremental-model-if-its-model
- https://github.com/dbt-labs/dbt-core/issues/7732

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.