This error happens because Delta's Liquid Clustering requires column statistics to be collected for every column specified in your cluster_by.cols list (Travel Month, Operating Carrier, Departure Airport IATA, Arrival Airport IATA), but Enzyme (the internal engine handling Metric Views and Materialized Views) omitted Operating Carrier from the stats schema during its internal initialization query (__enzyme_row_id__). Since this started failing across all metric views without any definition changes, it points to a recent Databricks backend runtime update tightening stats validation for DLT pipelines.
Here are few steps you can try:
1. Force stats collection on the clustering columns
Explicitly define the exact columns Delta must collect stats for using table properties on your target metric view:
ALTER TABLE `intelligence_dv`.`gold`.`bookings_adjusted_segments_metric_view`
SET TBLPROPERTIES (
'delta.dataSkippingStatsColumns' = 'Travel Month, Operating Carrier, Departure Airport IATA, Arrival Airport IATA'
);
Verification: Run the pipeline again to verify that the initialization phase passes without the missing stats error.
2. Perform a Full Refresh on the DLT pipeline
Backend runtime updates can cause internal Enzyme projections and Delta metadata to get out of sync. In your pipeline UI, click Select tables for refresh and run a Full Refresh.
Verification: Check the pipeline event log to ensure all tables rebuild cleanly from scratch.
3. Increase the indexed columns threshold
Delta Lake stops collecting statistics after the first 32 columns by default. If Operating Carrier sits further down in your schema, bump the limit:
ALTER TABLE `intelligence_dv`.`gold`.`bookings_adjusted_segments_metric_view`
SET TBLPROPERTIES ('delta.dataSkippingNumIndexedCols' = '64');
Verification: Trigger the pipeline and check the driver logs to confirm stats are generated for all clustering columns.
4. Workaround: Switch to Automatic Clustering
If explicit column clustering continues to fail due to Enzyme dropping stats context, update your YAML definition to let Databricks manage clustering automatically:
cluster_by:
auto: true
Verification: Re-deploy the YAML definition and confirm the scheduled materialization job runs to completion.
Hope this should work!
PS-If none of these work, I'd recommend raising a ticket with Databricks support, as this is likely a bug introduced in a recent Enzyme engine release for Metric Views.