From 738e210a68014fce578108a608c9dc721d3348ff Mon Sep 17 00:00:00 2001 From: Gerda Shank Date: Tue, 23 Jul 2024 16:55:51 -0400 Subject: [PATCH] Tweak check for existence of contract config --- .../macros/materializations/models/incremental/incremental.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt/include/global_project/macros/materializations/models/incremental/incremental.sql b/dbt/include/global_project/macros/materializations/models/incremental/incremental.sql index 5420287f..f932751a 100644 --- a/dbt/include/global_project/macros/materializations/models/incremental/incremental.sql +++ b/dbt/include/global_project/macros/materializations/models/incremental/incremental.sql @@ -40,7 +40,7 @@ {% else %} {% do run_query(get_create_table_as_sql(True, temp_relation, sql)) %} {% set contract_config = config.get('contract') %} - {% if not contract_config.enforced %} + {% if not contract_config or not contract_config.enforced %} {% do adapter.expand_target_column_types( from_relation=temp_relation, to_relation=target_relation) %}