Skip to content

Commit b6cbac5

Browse files
authored
Fix: Enable Hive dynamic partition in Spark session (#1228)
1 parent 5b15d6c commit b6cbac5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sqlmesh/engines/spark/db_api/spark_session.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ def cursor(self) -> SparkSessionCursor:
7575
# Note: Spark 3.4+ Only API
7676
self.spark.catalog.setCurrentCatalog(self.catalog)
7777
self.spark.conf.set("spark.sql.sources.partitionOverwriteMode", "dynamic")
78+
self.spark.conf.set("spark.hadoop.hive.exec.dynamic.partition", "true")
79+
self.spark.conf.set("spark.hadoop.hive.exec.dynamic.partition.mode", "nonstrict")
7880
return SparkSessionCursor(self.spark)
7981

8082
def commit(self) -> None:

0 commit comments

Comments
 (0)