Unable to apply liquid clustering to a materialized view
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2026 03:15 AM
Hi everyone,
I am trying to create a materialized view with liquid clustering using the code below. However, I realized that the query performance is slower than that of a streaming table with the same data, liquid clustering, and structure. It appears that liquid clustering is not present when I check the materialized view's metadata information. See the related screenshot. When I created the table as a streaming table, I could see that liquid clustering was applied successfully.
Thanks in advance.
@DP.materialized_view(
name="final_table",
cluster_by=["date"],
cluster_by_auto=True,
table_properties={
"delta.autoOptimize.autoCompact": "auto",
"delta.autoOptimize.optimizeWrite": "true"
}
)
def final_table():
return (
spark.read.table("my_table_1")
.unionByName(spark.read.table("my_table_2").drop("id"), allowMissingColumns=True)
)
Labels:
- Labels:
-
Delta Lake