You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Optimize not running in python models after the first run #913
Issue Description:
I have many SQL models that utilize liquid_cluster_by. The behavior for these models includes merge, cluster by, and optimize operations.
However, when I run Python models, I noticed the following behavior:
On the first run (when creating the table), the optimize operation is executed.
On subsequent runs, only the merge operation is performed.
If liquid_cluster_by is present, the merge operation is followed by cluster by, which is pointless without optimize.
Additionally, I observed that the optimize operation does not execute for Python models, regardless of whether liquid_cluster_by is specified.
Thanks for the report, and sorry for the long silence. We retested this on the current main branch using your exact config (workflow_job, incremental merge, liquid_clustered_by, external location_root) over 5 runs. Every incremental run now shows MERGE followed by OPTIMIZE in DESCRIBE HISTORY, so this is resolved in current versions. Closing as completed — feel free to reopen with your dbt.log if you still see it after upgrading.
Activity
benc-db commentedon Jan 27, 2025
Thanks for reporting
talperetz1 commentedon Jan 30, 2025
@benc-db Thank you for your answer. I edited the bug info and added the dbt.config so it is clear that I am talking about workflow_job
benc-db commentedon Mar 17, 2025
@talperetz1 can you try #963 with
use_materialization_v2: trueand let me know if you still have issues?sd-db commentedon Oct 22, 2026
Thanks for the report, and sorry for the long silence. We retested this on the current
mainbranch using your exact config (workflow_job, incremental merge,liquid_clustered_by, externallocation_root) over 5 runs. Every incremental run now showsMERGEfollowed byOPTIMIZEinDESCRIBE HISTORY, so this is resolved in current versions. Closing as completed — feel free to reopen with yourdbt.logif you still see it after upgrading.