Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update adaptors.sql to use tblproperties macro #848

Merged
8 changes: 7 additions & 1 deletion dbt/include/spark/macros/adapters.sql
Original file line number Diff line number Diff line change
@@ -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 (
Expand Down Expand Up @@ -156,10 +160,12 @@
{% endif %}
{{ file_format_clause() }}
{{ options_clause() }}
{{ tblproperties_clause() }}
{{ partition_cols(label="partitioned by") }}
{{ clustered_cols(label="clustered by") }}
{{ location_clause() }}
{{ comment_clause() }}

as
{{ compiled_code }}
{%- endif -%}
Expand Down