Liquid clustered table creation is failing when running together with model in insert_overwrite
incremental strategy under one run session
#931
Labels
bug
Something isn't working
Describe the bug
Databricks has dynamic partition overwrite config (here) which allow us to implement
insert_overwrite
incremental strategy.DBT set
spark.sql.sources.partitionOverwriteMode
to DYNAMIC during the incremental step of table withinsert_overwrite
strategy (dbt-databricks source code).This can create conflict for liquid clustered table down the line within the same DBT running session. Liquid clustered table couldn’t be created if dynamic partition overwrite mode is enabled. It will trigger the following error DELTA_CLUSTERING_WITH_DYNAMIC_PARTITION_OVERWRITE.
Steps To Reproduce
insert_overwrite
strategy &incremental
materialization.Expected behavior
DBT should always run
set spark.sql.sources.partitionOverwriteMode = STATIC
as apre-hook
for liquid clustered model to ensure it will always avoid this kind of failure.This can be fixed easily by set the same syntax above as liquid cluster model's pre-hook. However, DBT should be able to handle this automatically under the hood.
Screenshots and log output
none
System information
The output of
dbt --version
:Operating system: MacOS Sonoma 14.6.1
Python version: Python 3.11.11
Additional context
none
The text was updated successfully, but these errors were encountered: