<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Predictive Optimization for Streaming tables in Lakeflow pipelines in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/predictive-optimization-for-streaming-tables-in-lakeflow/m-p/169183#M56047</link>
    <description>&lt;P&gt;On July 2025&amp;nbsp;&lt;A href="https://www.databricks.com/blog/whats-new-lakeflow-declarative-pipelines-july-2025" target="_blank"&gt;https://www.databricks.com/blog/whats-new-lakeflow-declarative-pipelines-july-2025&lt;/A&gt;&amp;nbsp;predictive optimization was enabled for all UC managed Lakeflow pipelines. I was wondering if there is a possibility now to disable it for Streaming tables?&lt;/P&gt;&lt;P&gt;I see that it possible for delta tables with ALTER TABLE&amp;nbsp;{ ENABLE | DISABLE | INHERIT } PREDICTIVE OPTIMIZATION, but there is nothing in documentation for streaming tables, lakeflow pipeline properties.&lt;/P&gt;</description>
    <pubDate>Sat, 19 Sep 2026 13:07:19 GMT</pubDate>
    <dc:creator>Gilk</dc:creator>
    <dc:date>2026-09-19T13:07:19Z</dc:date>
    <item>
      <title>Predictive Optimization for Streaming tables in Lakeflow pipelines</title>
      <link>https://community.databricks.com/t5/data-engineering/predictive-optimization-for-streaming-tables-in-lakeflow/m-p/169183#M56047</link>
      <description>&lt;P&gt;On July 2025&amp;nbsp;&lt;A href="https://www.databricks.com/blog/whats-new-lakeflow-declarative-pipelines-july-2025" target="_blank"&gt;https://www.databricks.com/blog/whats-new-lakeflow-declarative-pipelines-july-2025&lt;/A&gt;&amp;nbsp;predictive optimization was enabled for all UC managed Lakeflow pipelines. I was wondering if there is a possibility now to disable it for Streaming tables?&lt;/P&gt;&lt;P&gt;I see that it possible for delta tables with ALTER TABLE&amp;nbsp;{ ENABLE | DISABLE | INHERIT } PREDICTIVE OPTIMIZATION, but there is nothing in documentation for streaming tables, lakeflow pipeline properties.&lt;/P&gt;</description>
      <pubDate>Sat, 19 Sep 2026 13:07:19 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/predictive-optimization-for-streaming-tables-in-lakeflow/m-p/169183#M56047</guid>
      <dc:creator>Gilk</dc:creator>
      <dc:date>2026-09-19T13:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: Predictive Optimization for Streaming tables in Lakeflow pipelines</title>
      <link>https://community.databricks.com/t5/data-engineering/predictive-optimization-for-streaming-tables-in-lakeflow/m-p/169196#M56055</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/239637"&gt;@Gilk&lt;/a&gt;,&lt;/P&gt;
&lt;P class="p1"&gt;Before the how, can I ask what is driving the wish to turn it off? For most pipeline tables predictive optimization is doing useful work, running OPTIMIZE, VACUUM, and ANALYZE on serverless compute so file sizes, storage, and statistics stay healthy without you scheduling maintenance jobs. If the concern is cost, a conflict with your writes, or time-travel retention, there is often a more targeted solution than switching predictive optimization off entirely. Happy to point at the right one if you can share what you are seeing.&lt;/P&gt;
&lt;P&gt;To answer your question... there is no toggle to turn off predictive optimization on the streaming table object itself. ALTER TABLE is not allowed on streaming tables, and neither &lt;A href="https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-ddl-alter-streaming-table" target="_blank"&gt;ALTER STREAMING TABLE&lt;/A&gt;&amp;nbsp;nor CREATE OR REFRESH exposes a PREDICTIVE OPTIMIZATION clause, so the per-table syntax you found for Delta managed tables has no direct equivalent here.&lt;/P&gt;
&lt;P&gt;What you can do is control it one level up. Streaming tables and materialized views created by a &lt;A href="https://docs.databricks.com/aws/en/ldp/concepts" target="_blank"&gt;Lakeflow pipeline&lt;/A&gt;&amp;nbsp;are Unity Catalog managed tables, and &lt;A href="https://docs.databricks.com/aws/en/optimizations/predictive-optimization" target="_blank"&gt;predictive optimization&lt;/A&gt;&amp;nbsp;uses an inheritance model across account, catalog, schema, and table. Since the table level is not settable for a streaming table, disable it at the schema or catalog that contains it, and the table inherits that.&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;ALTER SCHEMA my_catalog.my_schema DISABLE PREDICTIVE OPTIMIZATION;&lt;/LI-CODE&gt;
&lt;P&gt;or more broadly at catalog level..&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;ALTER CATALOG my_catalog DISABLE PREDICTIVE OPTIMIZATION;&lt;/LI-CODE&gt;
&lt;P&gt;PRedictive Optimization docs do not call out pipeline-managed tables as a special case, so I would verify it actually took effect on your object rather than assume. Both of these show the setting and whether it is inherited.&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;DESCRIBE SCHEMA EXTENDED my_catalog.my_schema;
DESCRIBE TABLE EXTENDED my_catalog.my_schema.my_streaming_table;
&lt;/LI-CODE&gt;
&lt;P&gt;You can also confirm whether predictive optimzation is still touching the table by querying the &lt;A href="https://docs.databricks.com/aws/en/admin/system-tables/predictive-optimization" target="_blank"&gt;predictive optimization system table&lt;/A&gt;, system.storage.predictive_optimization_operations_history.&lt;/P&gt;
&lt;P&gt;If you would rather keep predictive optimization on but shape its behaviour instead of turning it off:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Control VACUUM retention with the delta.deletedFileRetentionDuration table property, set in your pipeline definition. Just remember to set it before predictive optimization is enabled, and VACUUM FULL still enforces a 7-day minimum even if you configure a shorter value.&lt;/LI&gt;
&lt;LI&gt;If you are using automatic liquid clustering, predictive optimization may select or evolve clustering keys. Specifying explicit clustering columns in your pipeline definition avoids that.&lt;/LI&gt;
&lt;LI&gt;If predictive optimization is causing concurrency conflicts with active streaming writes, that is worth raising a support ticket.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Hope that helps.&lt;/P&gt;
&lt;P class="p1"&gt;&lt;FONT size="2" color="#FF6600"&gt;&lt;STRONG&gt;&lt;I&gt;If this answer resolves your question, could you mark it as “Accept as Solution”? That helps other users quickly find the correct fix.&lt;/I&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;I&gt;&lt;/I&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 19 Sep 2026 18:16:54 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/predictive-optimization-for-streaming-tables-in-lakeflow/m-p/169196#M56055</guid>
      <dc:creator>Ashwin_DSA</dc:creator>
      <dc:date>2026-09-19T18:16:54Z</dc:date>
    </item>
    <item>
      <title>Re: Predictive Optimization for Streaming tables in Lakeflow pipelines</title>
      <link>https://community.databricks.com/t5/data-engineering/predictive-optimization-for-streaming-tables-in-lakeflow/m-p/169198#M56057</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/216690"&gt;@Ashwin_DSA&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thanks for your answer.&lt;/P&gt;&lt;P&gt;Unfortunately, this doesn’t work. Even when predictive optimization (PO) is disabled at the schema or catalog level, the pipeline creates streaming tables with PO enabled.&lt;/P&gt;&lt;P&gt;We would like to disable PO because, in our case, it provides no benefit and only adds costs. Running OPTIMIZE and VACUUM once a day is sufficient for our needs. However, PO runs OPTIMIZE, VACUUM, and&lt;BR /&gt;ANALYZE multiple times throughout the day, resulting in additional charges.&lt;/P&gt;&lt;P&gt;Another issue is compression. We write these tables using ZSTD compression, but PO rewrites the files using Snappy during optimization. In our case, this increases the storage footprint compared with ZSTD.&lt;/P&gt;</description>
      <pubDate>Sat, 19 Sep 2026 18:46:16 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/predictive-optimization-for-streaming-tables-in-lakeflow/m-p/169198#M56057</guid>
      <dc:creator>Gilk</dc:creator>
      <dc:date>2026-09-19T18:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: Predictive Optimization for Streaming tables in Lakeflow pipelines</title>
      <link>https://community.databricks.com/t5/data-engineering/predictive-optimization-for-streaming-tables-in-lakeflow/m-p/169230#M56059</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/239637"&gt;@Gilk&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Thanks. I need to correct my earlier answer.&lt;/P&gt;
&lt;P&gt;Having checked this internally, for streaming tables and materialized views managed by a Lakeflow pipeline, there is currently no supported way to disable predictive optimization. PO runs maintenance on these pipeline-published tables even when it is disabled at the account, catalog, or schema level, so the inheritance approach I suggested does not override the pipeline behaviour. The pipelines.autoOptimize.managed property does not help either, since the docs note it is not used for pipelines managed by predictive optimisation.&lt;/P&gt;
&lt;P&gt;PO maintains pipeline tables through backing objects that a table-level switch would not fully cover, and the pipeline model guarantees these tables stay maintained rather than silently accumulating stale files. The trade-off is that maintenance runs at an adaptive cadence rather than a fixed daily cadence, which is positive for many pipelines but is exactly the wrong side of the deal when a single daily OPTIMIZE and VACUUM already meets your needs. A hard opt-out or a cadence control is a fair feature request to raise with your Databricks account team or via a support case.&lt;/P&gt;
&lt;P&gt;The compression point is more actionable, though. The codec OPTIMIZE writes with is controlled by the delta.parquet.compression.codec table &lt;A href="https://docs.databricks.com/aws/en/tables/table-properties" target="_blank"&gt;property&lt;/A&gt;, which it reads from the Delta log. If that property is not set on the table, OPTIMIZE defaults away from ZSTD, which lines up with what you are seeing. Your ZSTD is likely coming from a write-time setting that OPTIMIZE does not pick up. The fix is to set the codec as a table property in the pipeline definition so it survives pipeline updates and PO honors it on subsequent OPTIMIZE runs.&lt;/P&gt;
&lt;P&gt;For a SQL pipeline, add TBLPROPERTIES ('delta.parquet.compression.codec' = 'zstd') to the &lt;A href="https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-ddl-create-streaming-table" target="_blank"&gt;streaming table&lt;/A&gt; definition. For &lt;A href="https://docs.databricks.com/aws/en/ldp/developer/ldp-python-ref-table" target="_blank"&gt;Python&lt;/A&gt;, pass table_properties={"delta.parquet.compression.codec": "zstd"} on the table decorator.&lt;/P&gt;
&lt;P&gt;Setting the property only affects future writes. To recompress existing files, &lt;A href="https://docs.databricks.com/aws/en/sql/language-manual/delta-optimize" target="_blank"&gt;OPTIMIZE&lt;/A&gt; table_name FULL recompresses when the codec changes, on Databricks Runtime 16.0 and above. One caveat, manual maintenance commands are often restricted on pipeline-managed streaming tables, so I would test OPTIMIZE FULL on a single table before relying on it. The table property route above is the safe path either way, since PO will apply the new codec on its next run.&lt;/P&gt;
&lt;P&gt;Let me know how that goes. Happy to investigate further.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Sep 2026 10:43:20 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/predictive-optimization-for-streaming-tables-in-lakeflow/m-p/169230#M56059</guid>
      <dc:creator>Ashwin_DSA</dc:creator>
      <dc:date>2026-09-20T10:43:20Z</dc:date>
    </item>
  </channel>
</rss>

