From c71a91accc780ed4e82f316669337ae5b65ef10f Mon Sep 17 00:00:00 2001 From: Ratandeep Sharma Date: Tue, 27 Aug 2024 21:36:25 +0530 Subject: [PATCH 1/4] removed columns for an incremental model behaviour I found confusion line as it states "Similarly, if you remove a column from your incremental model, and execute a dbt run, this column will not be removed from your target table." But during the actual dbt run, it will encounter an error, though the documentation feels that dbt run should not fail. Link of the page https://docs.getdbt.com/docs/build/incremental-models#default-behavior --- website/docs/docs/build/incremental-models.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/build/incremental-models.md b/website/docs/docs/build/incremental-models.md index 2f8bbc46c3a..3d9beaa5959 100644 --- a/website/docs/docs/build/incremental-models.md +++ b/website/docs/docs/build/incremental-models.md @@ -216,7 +216,7 @@ This is the behavior if `on_schema_change: ignore`, which is set by default, and If you add a column to your incremental model, and execute a `dbt run`, this column will _not_ appear in your target table. -Similarly, if you remove a column from your incremental model, and execute a `dbt run`, this column will _not_ be removed from your target table. +Similarly, if you remove a column from your incremental model, and execute a `dbt run`, `dbt run` will fail. Instead, whenever the logic of your incremental changes, execute a full-refresh run of both your incremental model and any downstream models. From aed4c645c5a9b9f7a4f638cd9325063557f63e96 Mon Sep 17 00:00:00 2001 From: Ly Nguyen <107218380+nghi-ly@users.noreply.github.com> Date: Wed, 18 Sep 2024 12:28:09 -0700 Subject: [PATCH 2/4] Update website/docs/docs/build/incremental-models.md --- website/docs/docs/build/incremental-models.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/build/incremental-models.md b/website/docs/docs/build/incremental-models.md index 3d9beaa5959..b16452fab81 100644 --- a/website/docs/docs/build/incremental-models.md +++ b/website/docs/docs/build/incremental-models.md @@ -216,7 +216,7 @@ This is the behavior if `on_schema_change: ignore`, which is set by default, and If you add a column to your incremental model, and execute a `dbt run`, this column will _not_ appear in your target table. -Similarly, if you remove a column from your incremental model, and execute a `dbt run`, `dbt run` will fail. +If you remove a column from your incremental model and execute a `dbt run`, `dbt run` will fail. Instead, whenever the logic of your incremental changes, execute a full-refresh run of both your incremental model and any downstream models. From 92d1247a2a2f02f5404fb7497c35dbf15f0fdca2 Mon Sep 17 00:00:00 2001 From: Ratandeep Sharma Date: Thu, 7 Nov 2024 11:41:12 +0530 Subject: [PATCH 3/4] removed "and on older versions of dbt" in the sentence on line 215 Removed "and on older versions of dbt" in the sentence on line 215? This has been the default behavior for a while so is safe to remove. --- website/docs/docs/build/incremental-models.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/build/incremental-models.md b/website/docs/docs/build/incremental-models.md index b16452fab81..8011ca5366a 100644 --- a/website/docs/docs/build/incremental-models.md +++ b/website/docs/docs/build/incremental-models.md @@ -212,7 +212,7 @@ Currently, `on_schema_change` only tracks top-level column changes. It does not ### Default behavior -This is the behavior if `on_schema_change: ignore`, which is set by default, and on older versions of dbt. +This is the behavior if `on_schema_change: ignore`, which is set by default. If you add a column to your incremental model, and execute a `dbt run`, this column will _not_ appear in your target table. From af54a24280eb3eeea7823ed27c7e360b89f8280c Mon Sep 17 00:00:00 2001 From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> Date: Thu, 7 Nov 2024 11:27:46 +0000 Subject: [PATCH 4/4] Update website/docs/docs/build/incremental-models.md --- website/docs/docs/build/incremental-models.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/build/incremental-models.md b/website/docs/docs/build/incremental-models.md index c60a5b3560f..a56246addf3 100644 --- a/website/docs/docs/build/incremental-models.md +++ b/website/docs/docs/build/incremental-models.md @@ -212,7 +212,7 @@ Currently, `on_schema_change` only tracks top-level column changes. It does not ### Default behavior -This is the behavior if `on_schema_change: ignore`, which is set by default. +This is the behavior of `on_schema_change: ignore`, which is set by default. If you add a column to your incremental model, and execute a `dbt run`, this column will _not_ appear in your target table.