---
title: dbt - Full refresh
description: A full refresh drops the tables of the selected dbt models and creates them again from the data that the sources hold now.
---

[Skip to content](https://knowledge.bigenius-x.com/dbt-full-refresh#main-content)

[Contact us](https://knowledge.bigenius-x.com/kb-tickets/new?hsLang=en) [Go to Customer Portal](https://knowledge.bigenius-x.com/customer-portal?hsLang=en)

[![TRI\_Logo\_biGENIUS\_2020\_RGB\_s](https://knowledge.bigenius-x.com/hs-fs/hubfs/Marketing/TRI_Logo_biGENIUS_2020_RGB_s.png?width=150&height=42&name=TRI_Logo_biGENIUS_2020_RGB_s.png)](https://www.bigenius-x.com/)

Open main navigation

Close main navigation

- [Contact us](https://knowledge.bigenius-x.com/kb-tickets/new)
- [Go to Customer Portal](https://knowledge.bigenius-x.com/customer-portal)

 How can we help you?

- There are no suggestions because the search field is empty.

1. [biGENIUS-X Knowledge Base](https://knowledge.bigenius-x.com/?hsLang=en)
2. [Generators](https://knowledge.bigenius-x.com/generators?hsLang=en)
3. [Deployment](https://knowledge.bigenius-x.com/generators?hsLang=en#deployment)

# dbt - Full refresh

**Applies to**  
Platform: Snowflake dbt · Databricks dbt

A full refresh drops the tables of the selected dbt models and creates them again from the data that the sources hold now. Use it when an existing table must take a changed data type, or on Databricks dbt changed partition columns, which a normal `dbt run` does not apply. Afterwards the refreshed tables have the columns of their models and hold the current source rows.

### Prerequisites

- The project has run at least once, as described in [dbt - Deployment](https://knowledge.bigenius-x.com/dbt-deployment?hsLang=en).
- The artifacts with the changed model objects are [generated](https://knowledge.bigenius-x.com/generate-artifacts?hsLang=en) and [downloaded](https://knowledge.bigenius-x.com/download-generated-artifacts?hsLang=en), and the values in `dbt_project.yml` are set, see [dbt - Placeholder values](https://knowledge.bigenius-x.com/dbt-placeholder-values?hsLang=en).

### Run a full refresh

`dbt run --full-refresh` builds the selected models as on the first run: the generated materializations drop an existing table and create it again from the model's SQL, see [dbt - Artifacts](https://knowledge.bigenius-x.com/dbt-artifacts?hsLang=en). A model object with more than one dataflow has an owner model and one loader model per dataflow, see [Model objects with more than one dataflow](https://knowledge.bigenius-x.com/dbt-deployment?hsLang=en#model-objects-with-more-than-one-dataflow). The owner model creates the table again, empty or with only the unknown-member row. The loader models never drop the table; they insert the rows of their dataflows, as on the first run. With the owner model alone in the selection, the table holds no source rows afterwards.

Read these warnings before you select the models:

With `--full-refresh`, dbt drops the tables of Hubs, Links, Satellites and the other Raw Vault and Business Vault objects and rebuilds them from the data that the sources hold now. History that the sources no longer hold is lost, and there is no supported way to copy it back. The generated models build the table only from the current source rows, give them a new load timestamp and never read a backup. A backup lets you restore the table as it was, with the previous data type. Back up these tables before a full refresh. When their history must stay, keep the previous data type of the term, or exclude their models from the selection, so that their tables keep the previous data type.

A full refresh of a Mart Dimension assigns new surrogate keys. Mart Facts with the Fact Load Strategy Insert keep the keys of their earlier loads, which can then point to other members. Refresh these facts in the same run: add their models to the selection, for example `--select <dimension model> <fact model>`. Edit Dataflow shows the Fact Load Strategy of each dataflow, see [Fact Load Strategy (Dataflow)](https://knowledge.bigenius-x.com/fact-load-strategy-dataflow?hsLang=en#where-to-set-it).

A full refresh of a Raw Vault or Business Vault object gives all its rows a new load timestamp. Mart Facts with the Fact Load Strategy Insert that read the object with the incremental read filter insert these rows again. Refresh these Mart Facts in the same run. A full refresh rebuilds a Mart Fact only from the rows that its sources return now, and rows of earlier loads that they no longer return are lost, so back up these facts as well.

In the commands, `<selection>` is a model name or a selection in the [dbt selection syntax](https://docs.getdbt.com/reference/node-selection/syntax), as in [Run part of the project](https://knowledge.bigenius-x.com/dbt-deployment?hsLang=en#run-part-of-the-project).

1. Open a terminal in the artifacts folder, the folder that contains `dbt_project.yml`.
2. Run `dbt ls --resource-type model --select <selection> --output name`. dbt lists the models that the full refresh rebuilds. Model names are in lower case and start with the prefix of the model object type, for example `rdv_sat_` for a Satellite, see [dbt - Artifacts](https://knowledge.bigenius-x.com/dbt-artifacts?hsLang=en). For a model object with more than one dataflow, select the owner model and one loader model per dataflow: `--select <model name> <model name>_<dataflow name>_loader`.
3. Check the list against the warnings above. Back up each table that would lose history, including Mart Facts with the Fact Load Strategy Insert, or remove its model from the selection. A clone serves as backup: `CREATE TABLE <backup name> CLONE <table>;` on Snowflake ([CREATE … CLONE](https://docs.snowflake.com/en/sql-reference/sql/create-clone)), `CREATE TABLE <backup name> DEEP CLONE <table>;` on Databricks ([Clone a table](https://docs.databricks.com/aws/en/tables/operations/clone)), each with the full table names. To restore a table, run `CREATE OR REPLACE TABLE <table> CLONE <backup name>;` on Snowflake or `CREATE OR REPLACE TABLE <table> DEEP CLONE <backup name>;` on Databricks. Restore all tables of the same full refresh together, so that vault objects, Mart Dimensions and Mart Facts match again.
4. Run `dbt run --full-refresh --select <selection>`.

### Example

On Snowflake dbt, the term `CUSTOMER_SINCE` of the Satellite `common_customer` changed from `DATE` to `TIMESTAMP_NTZ`, and the artifacts are generated again. A normal `dbt run` keeps `DATE`. The source changed customer 1 and no longer holds customer 3. The Satellite holds:

```
CUSTOMER  CUSTOMER_TYPE  CUSTOMER_SINCE  BG_VALIDTOTIMESTAMP
1         1              2026-01-01      2026-11-23 23:31:17
1         changed        2026-01-01      9999-12-31 00:00:00
2         2              2026-01-02      9999-12-31 00:00:00
3         3              2026-01-03      9999-12-31 00:00:00
Unknown   Unknown        1900-01-01      9999-12-31 00:00:00
```

The selection is the Satellite's model, the prefix `rdv_sat_` followed by the model object name:

```
dbt ls --resource-type model --select rdv_sat_common_customer --output name
```

dbt lists only `rdv_sat_common_customer`. After a backup of the table, the full refresh recreates it:

```
dbt run --full-refresh --select rdv_sat_common_customer
```

The run ends with `Done. PASS=1`. `CUSTOMER_SINCE` is now `TIMESTAMP_NTZ`, and the table holds the unknown-member row and the two versions that the source view `rdv_sat_common_customer_source` returns now:

```
CUSTOMER  CUSTOMER_TYPE  CUSTOMER_SINCE       BG_VALIDTOTIMESTAMP
1         changed        2026-01-01 00:00:00  9999-12-31 00:00:00
2         2              2026-01-02 00:00:00  9999-12-31 00:00:00
Unknown   Unknown        1900-01-01 00:00:00  9999-12-31 00:00:00
```

The first version of customer 1 and customer 3 are lost. Databricks dbt, with `date` changed to `timestamp`, gives the same rows.

### Check the result

A run without errors ends with `Completed successfully`, followed by a line that starts with `Done. PASS=`. Run `DESCRIBE TABLE` on a refreshed table and compare the data types of its columns with the terms of the model object.

### Failure symptoms and recovery

#### A model stops after the partitioning changed

Message: `Partition columns changed for <table name> — Delta Lake does not support ALTER TABLE to change partitioning. Run with --full-refresh to recreate the table.`  
Cause: [Optimization Method](https://knowledge.bigenius-x.com/optimization-method-model-object?hsLang=en) or [Optimization Method Columns](https://knowledge.bigenius-x.com/optimization-method-columns-model-object?hsLang=en) of the model object now gives other partition columns than the existing table has. Databricks dbt only: its macro `process_config_changes` compares the partitioning of existing tables with the model. Changes of `Cluster By` are applied with `ALTER TABLE` without an error. The model inserts its new rows before the check stops it, and its post-hooks do not run, so the previous versions stay open.  
Fix: Set the previous partition columns again, or recreate the table of this model with a full refresh. Read the warnings in [Run a full refresh](https://knowledge.bigenius-x.com/dbt-full-refresh#run-a-full-refresh) first: the table loses the history that the sources no longer hold. After you set the previous partition columns again, the next run closes the versions left open and inserts no row twice.

#### A full refresh stops at a NOT NULL constraint

Message: `[DELTA_NEW_NOT_NULL_VIOLATION] <number> rows in <target catalog>.<profile schema>_<layer schema>.<table> violate the new NOT NULL constraint on <column>.`  
Cause: Databricks dbt only. A source row of the model holds NULL in a column that the model sets to NOT NULL. dbt has already recreated the table with the current source rows, including that row. A normal run of a Stage model stops with the same message, because dbt rebuilds the Stage table on every run. The table then lacks the NOT NULL constraints and keys that the model sets, and the post-hooks did not run. On Snowflake dbt, such a row stops the Stage model on every run with `NULL result in a non-nullable column`. The Stage table keeps the rows of the previous run.  
Fix: Correct the source rows and run the full refresh of the model again. The run sets the NOT NULL constraints and the keys again. If you cannot correct the source rows and step 3 made a backup of the table, restore it: `CREATE OR REPLACE TABLE <table> DEEP CLONE <backup name>;`. Without a backup, the table keeps the rows of the full refresh until you correct the source rows and run the full refresh again.

For failures of a normal run, see [dbt - Deployment](https://knowledge.bigenius-x.com/dbt-deployment?hsLang=en#failure-symptoms-and-recovery).

### Related articles

- Previous: [dbt - Deployment](https://knowledge.bigenius-x.com/dbt-deployment?hsLang=en), [Generate artifacts](https://knowledge.bigenius-x.com/generate-artifacts?hsLang=en), [Download generated artifacts](https://knowledge.bigenius-x.com/download-generated-artifacts?hsLang=en), [dbt - Placeholder values](https://knowledge.bigenius-x.com/dbt-placeholder-values?hsLang=en)
- Reference: [Optimization Method (Model Object)](https://knowledge.bigenius-x.com/optimization-method-model-object?hsLang=en), [Optimization Method Columns (Model Object)](https://knowledge.bigenius-x.com/optimization-method-columns-model-object?hsLang=en), [Fact Load Strategy (Dataflow)](https://knowledge.bigenius-x.com/fact-load-strategy-dataflow?hsLang=en)
- See also: [dbt - Artifacts](https://knowledge.bigenius-x.com/dbt-artifacts?hsLang=en), [Mart Dimension](https://knowledge.bigenius-x.com/mart-dimension?hsLang=en), [Mart Fact](https://knowledge.bigenius-x.com/mart-fact?hsLang=en), [Configure an incremental load](https://knowledge.bigenius-x.com/configure-an-incremental-load?hsLang=en)

- [Getting started](https://knowledge.bigenius-x.com/getting-started?hsLang=en#main-content)

    - [Guidelines](https://knowledge.bigenius-x.com/getting-started?hsLang=en#guidelines)
    - [Start working](https://knowledge.bigenius-x.com/getting-started?hsLang=en#start-working)
    - [Account](https://knowledge.bigenius-x.com/getting-started?hsLang=en#account)
- [General overview](https://knowledge.bigenius-x.com/general-overview?hsLang=en)
- [Artificial Intelligence](https://knowledge.bigenius-x.com/artificial-intelligence?hsLang=en#main-content)

    - [MCP server](https://knowledge.bigenius-x.com/artificial-intelligence?hsLang=en#mcp-server)
- [Application Modules](https://knowledge.bigenius-x.com/application-modules?hsLang=en#main-content)

    - [Administration](https://knowledge.bigenius-x.com/application-modules?hsLang=en#administration)
    - [Solutions](https://knowledge.bigenius-x.com/application-modules?hsLang=en#solutions)
    - [Global Features](https://knowledge.bigenius-x.com/application-modules?hsLang=en#global-features)
    - [Projects](https://knowledge.bigenius-x.com/application-modules?hsLang=en#projects)
    - [Branches](https://knowledge.bigenius-x.com/application-modules?hsLang=en#branches)
    - [Data Connections](https://knowledge.bigenius-x.com/application-modules?hsLang=en#data-connections)
    - [Dataflow Modeling - Overview](https://knowledge.bigenius-x.com/application-modules?hsLang=en#dataflow-modeling-overview)
    - [Dataflow Modeling - Wizard Steps](https://knowledge.bigenius-x.com/application-modules?hsLang=en#dataflow-modeling-wizard-steps)
    - [Dataflow Modeling - Terms](https://knowledge.bigenius-x.com/application-modules?hsLang=en#dataflow-modeling-terms)
    - [Dataflow Modeling - Term Mapping](https://knowledge.bigenius-x.com/application-modules?hsLang=en#dataflow-modeling-term-mapping)
    - [Dataflow Modeling - Relationships](https://knowledge.bigenius-x.com/application-modules?hsLang=en#dataflow-modeling-relationships)
    - [Dataflow Modeling - Data Quality](https://knowledge.bigenius-x.com/application-modules?hsLang=en#dataflow-modeling-data-quality)
    - [Dataflow Modeling - Indexes](https://knowledge.bigenius-x.com/application-modules?hsLang=en#dataflow-modeling-indexes)
    - [Relationship Modeling](https://knowledge.bigenius-x.com/application-modules?hsLang=en#relationship-modeling)
    - [Generate Artifacts](https://knowledge.bigenius-x.com/application-modules?hsLang=en#generate-artifacts)
    - [Project Settings](https://knowledge.bigenius-x.com/application-modules?hsLang=en#project-settings)
    - [Data Marketplace](https://knowledge.bigenius-x.com/application-modules?hsLang=en#data-marketplace)
- [Generators](https://knowledge.bigenius-x.com/generators?hsLang=en#main-content)

    - [Databricks](https://knowledge.bigenius-x.com/generators?hsLang=en#databricks)
    - [Databricks dbt](https://knowledge.bigenius-x.com/generators?hsLang=en#databricks-dbt)
    - [Fabric Lakehouse](https://knowledge.bigenius-x.com/generators?hsLang=en#fabric-lakehouse)
    - [Fabric Warehouse](https://knowledge.bigenius-x.com/generators?hsLang=en#fabric-warehouse)
    - [Microsoft SQL Server](https://knowledge.bigenius-x.com/generators?hsLang=en#microsoft-sql-server)
    - [Oracle](https://knowledge.bigenius-x.com/generators?hsLang=en#oracle)
    - [Snowflake](https://knowledge.bigenius-x.com/generators?hsLang=en#snowflake)
    - [Snowflake dbt](https://knowledge.bigenius-x.com/generators?hsLang=en#snowflake-dbt)
    - [Artifacts](https://knowledge.bigenius-x.com/generators?hsLang=en#artifacts)
    - [Replace Placeholders](https://knowledge.bigenius-x.com/generators?hsLang=en#replace-placeholders)
    - [Target solution environment](https://knowledge.bigenius-x.com/generators?hsLang=en#target-solution-environment)
    - [Deployment](https://knowledge.bigenius-x.com/generators?hsLang=en#deployment)
    - [Deployment with an Azure DevOps pipeline](https://knowledge.bigenius-x.com/generators?hsLang=en#deployment-with-an-azure-devops-pipeline)
    - [Delta Deployment](https://knowledge.bigenius-x.com/generators?hsLang=en#delta-deployment)
    - [Load control environment](https://knowledge.bigenius-x.com/generators?hsLang=en#load-control-environment)
    - [Load data with a native load control](https://knowledge.bigenius-x.com/generators?hsLang=en#load-data-with-a-native-load-control)
    - [Load data with Apache Airflow](https://knowledge.bigenius-x.com/generators?hsLang=en#load-data-with-apache-airflow)
    - [Model Object Type](https://knowledge.bigenius-x.com/generators?hsLang=en#model-object-type)
    - [Properties](https://knowledge.bigenius-x.com/generators?hsLang=en#properties)
    - [Default Terms](https://knowledge.bigenius-x.com/generators?hsLang=en#default-terms)
- [Discovery application](https://knowledge.bigenius-x.com/discovery-application?hsLang=en#main-content)

    - [Discovery configurations](https://knowledge.bigenius-x.com/discovery-application?hsLang=en#discovery-configurations)
- [Best practices](https://knowledge.bigenius-x.com/best-practices?hsLang=en#main-content)

    - [Modeling Approaches](https://knowledge.bigenius-x.com/best-practices?hsLang=en#modeling-approaches)
    - [Use Cases](https://knowledge.bigenius-x.com/best-practices?hsLang=en#use-cases)
    - [Business Rules](https://knowledge.bigenius-x.com/best-practices?hsLang=en#business-rules)
    - [Data Quality Rules](https://knowledge.bigenius-x.com/best-practices?hsLang=en#data-quality-rules)
- [FAQs](https://knowledge.bigenius-x.com/faqs?hsLang=en)
- [Product Release Notes](https://knowledge.bigenius-x.com/product-release-notes?hsLang=en#main-content)

    - [SaaS Application](https://knowledge.bigenius-x.com/product-release-notes?hsLang=en#saas-application)
    - [Discovery application](https://knowledge.bigenius-x.com/product-release-notes?hsLang=en#discovery-application)
    - [Generators](https://knowledge.bigenius-x.com/product-release-notes?hsLang=en#generators)
    - [MCP server](https://knowledge.bigenius-x.com/product-release-notes?hsLang=en#mcp-server)
- [Legal Documents](https://knowledge.bigenius-x.com/legal-documents?hsLang=en#main-content)

    - [Current legal docs](https://knowledge.bigenius-x.com/legal-documents?hsLang=en#current-legal-docs)
    - [Software Product and Limits](https://knowledge.bigenius-x.com/legal-documents?hsLang=en#software-product-and-limits)

- [Contact us](https://knowledge.bigenius-x.com/kb-tickets/new?hsLang=en)
- [Customer Portal](https://knowledge.bigenius-x.com/customer-portal)
- [Sign in](https://knowledge.bigenius-x.com/_hcms/mem/login)

[![biGENIUS logo](https://knowledge.bigenius-x.com/hubfs/TRI_Logo_biGENIUS_2020_RGB-1.svg "biGENIUS logo")](https://www.bigenius-x.com)

<https://www.linkedin.com/company/bigenius> <https://www.youtube.com/@biGENIUS_DWA>

All rights reserved © 2025, biGENIUS AG