From f2bb3adc744eb13650bdba86c07debc3d881aa66 Mon Sep 17 00:00:00 2001 From: Doug Beatty Date: Thu, 14 Dec 2023 13:46:36 -0700 Subject: [PATCH 1/2] Remove `invalid_insert_overwrite_delta_msg` message --- .../spark/macros/materializations/incremental/validate.sql | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/dbt/include/spark/macros/materializations/incremental/validate.sql b/dbt/include/spark/macros/materializations/incremental/validate.sql index 88b851ca4..0d4c4d8b6 100644 --- a/dbt/include/spark/macros/materializations/incremental/validate.sql +++ b/dbt/include/spark/macros/materializations/incremental/validate.sql @@ -29,17 +29,12 @@ You can only choose this strategy when file_format is set to 'delta' or 'iceberg' or 'hudi' {%- endset %} - {% set invalid_insert_overwrite_delta_msg -%} - Invalid incremental strategy provided: {{ raw_strategy }} - You cannot use this strategy when file_format is set to 'delta' or 'iceberg' - Use the 'append' or 'merge' strategy instead - {%- endset %} - {% set invalid_insert_overwrite_endpoint_msg -%} Invalid incremental strategy provided: {{ raw_strategy }} You cannot use this strategy when connecting via endpoint Use the 'append' or 'merge' strategy instead {%- endset %} + {% if raw_strategy not in ['append', 'merge', 'insert_overwrite'] %} {% do exceptions.raise_compiler_error(invalid_strategy_msg) %} {%-else %} From ca0ea6ac4abce0dce9c0c7a3a21e0bccba06ee30 Mon Sep 17 00:00:00 2001 From: Doug Beatty Date: Thu, 14 Dec 2023 13:47:55 -0700 Subject: [PATCH 2/2] Changelog entry --- .changes/unreleased/Under the Hood-20231214-134728.yaml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changes/unreleased/Under the Hood-20231214-134728.yaml diff --git a/.changes/unreleased/Under the Hood-20231214-134728.yaml b/.changes/unreleased/Under the Hood-20231214-134728.yaml new file mode 100644 index 000000000..b1de2ddb7 --- /dev/null +++ b/.changes/unreleased/Under the Hood-20231214-134728.yaml @@ -0,0 +1,6 @@ +kind: Under the Hood +body: Remove unused `invalid_insert_overwrite_delta_msg` message +time: 2023-12-14T13:47:28.444107-07:00 +custom: + Author: dbeatty10 + Issue: "962"