From f017a0bd1126da47b2fdb149178e613ad9367ed7 Mon Sep 17 00:00:00 2001 From: etheleon Date: Fri, 4 Aug 2023 01:18:33 +0800 Subject: [PATCH] update macro name and follow pattern from other use cases * changed macro `dbt_spark_tblproperties_clause()` to `spark__tblproperties_clause()` * create new macro `tblproperties_clause()` which references the above --- dbt/include/spark/macros/adapters.sql | 6 +++++- dbt/include/spark/macros/materializations/seed.sql | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dbt/include/spark/macros/adapters.sql b/dbt/include/spark/macros/adapters.sql index 202564e4e..ac1faae9e 100644 --- a/dbt/include/spark/macros/adapters.sql +++ b/dbt/include/spark/macros/adapters.sql @@ -1,4 +1,8 @@ -{% macro dbt_spark_tblproperties_clause() -%} +{% macro tblproperties_clause() %} + {{ return(adapter.dispatch('tblproperties_clause', 'dbt')()) }} +{%- endmacro -%} + +{% macro spark__tblproperties_clause() -%} {%- set tblproperties = config.get('tblproperties') -%} {%- if tblproperties is not none %} tblproperties ( diff --git a/dbt/include/spark/macros/materializations/seed.sql b/dbt/include/spark/macros/materializations/seed.sql index b174058ef..23ff339bc 100644 --- a/dbt/include/spark/macros/materializations/seed.sql +++ b/dbt/include/spark/macros/materializations/seed.sql @@ -69,7 +69,7 @@ {{ clustered_cols(label="clustered by") }} {{ location_clause() }} {{ comment_clause() }} - {{ dbt_spark_tblproperties_clause() }} + {{ tblproperties_clause() }} {% endset %} {% call statement('_') -%}