From 7b0457edba0db130a512ac57be4d39483a6319ec Mon Sep 17 00:00:00 2001 From: grindheim Date: Thu, 25 Nov 2021 15:36:57 +0100 Subject: [PATCH 1/3] Replaced definition for set full_refresh_mode --- .../spark/macros/materializations/incremental/incremental.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt/include/spark/macros/materializations/incremental/incremental.sql b/dbt/include/spark/macros/materializations/incremental/incremental.sql index 72b4d2516..d0b6e89ba 100644 --- a/dbt/include/spark/macros/materializations/incremental/incremental.sql +++ b/dbt/include/spark/macros/materializations/incremental/incremental.sql @@ -10,7 +10,7 @@ {%- set unique_key = config.get('unique_key', none) -%} {%- set partition_by = config.get('partition_by', none) -%} - {%- set full_refresh_mode = (flags.FULL_REFRESH == True) -%} + {%- set full_refresh_mode = (should_full_refresh()) -%} {% set on_schema_change = incremental_validate_on_schema_change(config.get('on_schema_change'), default='ignore') %} From 7874dcc22898a8c72cc1a55000d61520ff8bce64 Mon Sep 17 00:00:00 2001 From: grindheim Date: Thu, 25 Nov 2021 16:05:07 +0100 Subject: [PATCH 2/3] Updated changelog --- CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 551b21c55..5fe5ae04f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ ## dbt-spark 1.0.0 (Release TBD) +### Fixes +- ```dbt run --full-refresh``` corrected to respect config that overrides full_refresh = False. As explained in [issue 260](/~https://github.com/dbt-labs/dbt-spark/issues/260), the current incremental implementation only uses the FULL_REFRESH flag, unlike the implementation in dbt-code/dbt-snowflake, etc. + +### Contributors +- [@grindheim](/~https://github.com/grindheim) ([#260](/~https://github.com/dbt-labs/dbt-spark/pull/262/) + ## dbt-spark 1.0.0rc2 (November 24, 2021) ### Features @@ -20,6 +26,12 @@ ## dbt-spark 0.21.1 (Release TBD) +### Fixes +- ```dbt run --full-refresh``` corrected to respect config that overrides full_refresh = False. As explained in [issue 260](/~https://github.com/dbt-labs/dbt-spark/issues/260), the current incremental implementation only uses the FULL_REFRESH flag, unlike the implementation in dbt-code/dbt-snowflake, etc. + +### Contributors +- [@grindheim](/~https://github.com/grindheim) ([#260](/~https://github.com/dbt-labs/dbt-spark/pull/262/) + ## dbt-spark 0.21.1rc1 (November 3, 2021) ### Fixes From c43aea44aad1430f7b76e2a9a8f9f099b355a5eb Mon Sep 17 00:00:00 2001 From: Jeremy Cohen Date: Mon, 29 Nov 2021 11:04:26 +0100 Subject: [PATCH 3/3] Edit changelog --- CHANGELOG.md | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fe5ae04f..63d245797 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,10 @@ ## dbt-spark 1.0.0 (Release TBD) ### Fixes -- ```dbt run --full-refresh``` corrected to respect config that overrides full_refresh = False. As explained in [issue 260](/~https://github.com/dbt-labs/dbt-spark/issues/260), the current incremental implementation only uses the FULL_REFRESH flag, unlike the implementation in dbt-code/dbt-snowflake, etc. +- Incremental materialization corrected to respect `full_refresh` config, by using `should_full_refresh()` macro ([#260](/~https://github.com/dbt-labs/dbt-spark/issues/260), [#262](/~https://github.com/dbt-labs/dbt-spark/pull/262/)) ### Contributors -- [@grindheim](/~https://github.com/grindheim) ([#260](/~https://github.com/dbt-labs/dbt-spark/pull/262/) +- [@grindheim](/~https://github.com/grindheim) ([#262](/~https://github.com/dbt-labs/dbt-spark/pull/262/)) ## dbt-spark 1.0.0rc2 (November 24, 2021) @@ -26,12 +26,6 @@ ## dbt-spark 0.21.1 (Release TBD) -### Fixes -- ```dbt run --full-refresh``` corrected to respect config that overrides full_refresh = False. As explained in [issue 260](/~https://github.com/dbt-labs/dbt-spark/issues/260), the current incremental implementation only uses the FULL_REFRESH flag, unlike the implementation in dbt-code/dbt-snowflake, etc. - -### Contributors -- [@grindheim](/~https://github.com/grindheim) ([#260](/~https://github.com/dbt-labs/dbt-spark/pull/262/) - ## dbt-spark 0.21.1rc1 (November 3, 2021) ### Fixes