From 595c03e664335a79d29c34b734c6d33a62eed739 Mon Sep 17 00:00:00 2001 From: Ben Schreiber Date: Sun, 3 Dec 2023 20:26:25 +0200 Subject: [PATCH] Fix hardcoded file format in python materializations --- dbt/include/spark/macros/materializations/table.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt/include/spark/macros/materializations/table.sql b/dbt/include/spark/macros/materializations/table.sql index 39a9caba9..b7c56c424 100644 --- a/dbt/include/spark/macros/materializations/table.sql +++ b/dbt/include/spark/macros/materializations/table.sql @@ -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()%}