Skip to content

Commit

Permalink
Fix hardcoded file format in python materializations
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Schreiber committed Dec 3, 2023
1 parent d0a60a7 commit 595c03e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dbt/include/spark/macros/materializations/table.sql
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ else:
msg = f"{type(df)} is not a supported type for dbt Python materialization"
raise Exception(msg)

df.write.mode("overwrite").format("delta").option("overwriteSchema", "true").saveAsTable("{{ target_relation }}")
df.write.mode("overwrite").format("{{ config.get('file_format', 'delta') }}").option("overwriteSchema", "true").saveAsTable("{{ target_relation }}")
{%- endmacro -%}

{%macro py_script_comment()%}
Expand Down

0 comments on commit 595c03e

Please sign in to comment.