<?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 Re: Serverless pipeline with Materialized Views vs. Delta overwrite tables for ~60 Gold outputs in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/serverless-pipeline-with-materialized-views-vs-delta-overwrite/m-p/172289#M56619</link>
    <description>&lt;DIV&gt;
&lt;P&gt;&lt;STRONG&gt;Short answer:&lt;/STRONG&gt; if your MVs are already doing a full recompute, swapping them for &lt;CODE&gt;overwrite&lt;/CODE&gt; Delta tables won't give you a real win, and it's likely to cost you more. I'd keep the pipelines, find out why the MVs aren't going incremental, and benchmark before rewriting 60 outputs.&lt;/P&gt;
&lt;H2&gt;1. Is there a benefit to Delta overwrite?&lt;/H2&gt;
&lt;P&gt;A full MV recompute and a &lt;CODE&gt;CREATE OR REPLACE&lt;/CODE&gt;-style overwrite do essentially the same work: read the sources, run the query, and write the full result. You'd be giving up what the pipeline gives you for free and getting no new compute savings in return.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Shared intermediate results.&lt;/STRONG&gt; Pipeline 2 reads Pipeline 1's MVs, so that logic is computed once and read many times. If each Gold table reads Curated directly, every one of them re-executes the shared joins, aggregations and dedups. You're right that serverless has no &lt;CODE&gt;cache()&lt;/CODE&gt;/&lt;CODE&gt;persist()&lt;/CODE&gt;, so there's nothing in memory to compensate. The only way to share work on serverless is to materialize it, and that's what your Pipeline 1 MVs already do.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Dependency and parallelism handling.&lt;/STRONG&gt; The pipeline builds the DAG from table references and runs independent flows concurrently [1]. With plain overwrites you rebuild that yourself as job tasks or notebook orchestration, usually with less parallelism and extra per-task startup and scheduling overhead.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Write amplification.&lt;/STRONG&gt; Overwriting rewrites every file on every run. An MV that is eligible for incremental refresh can avoid that, and you'd lose the option.&lt;/LI&gt;
&lt;/UL&gt;
&lt;H2&gt;2. Why cost and runtime usually go up after this change&lt;/H2&gt;
&lt;P&gt;From what I've seen, it's almost always one of these:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;STRONG&gt;Duplicated upstream logic.&lt;/STRONG&gt; The shared MV layer disappears and every downstream table recomputes it. This is the most common cause.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Lost concurrency.&lt;/STRONG&gt; The orchestration that replaces the pipeline DAG ends up more serial, so wall-clock time rises and you pay for the serverless compute while it waits.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Per-task overhead.&lt;/STRONG&gt; Many small tasks each pay startup, planning and commit costs that the pipeline amortized.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Full rewrites&lt;/STRONG&gt; of large outputs that would otherwise have been incremental.&lt;/LI&gt;
&lt;/OL&gt;
&lt;H2&gt;3. What I'd do instead&lt;/H2&gt;
&lt;P&gt;&lt;STRONG&gt;a) Find out why the MVs recompute.&lt;/STRONG&gt; You already have &lt;CODE&gt;planning_information&lt;/CODE&gt; in the event log. Look at the reason it gives for each MV, because it tells you what blocks incremental refresh. Typical culprits are:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Source tables without row tracking or deletion vectors enabled.&lt;/LI&gt;
&lt;LI&gt;Query constructs or non-deterministic expressions that the incremental planner can't handle.&lt;/LI&gt;
&lt;LI&gt;A cost model decision that a full recompute is cheaper, which is common when most of the source changes every run.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Row tracking and deletion vectors on the Curated tables are the first things I'd check:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="language-sql"&gt;ALTER TABLE catalog.schema.curated_table SET TBLPROPERTIES (
  delta.enableRowTracking = true,
  delta.enableDeletionVectors = true
);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I wouldn't spend time on change data feed for this. Incremental MV refresh doesn't hinge on CDF on the sources. Row tracking is the property to focus on.&lt;/P&gt;
&lt;P&gt;Also be realistic about the workload. If your Curated tables are fully rewritten each load, or most rows change daily, a full recompute may be the right plan and incremental won't help.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;b) Find where the 40 minutes goes.&lt;/STRONG&gt; With ~60 outputs it's rarely evenly spread. Usually a handful of flows dominate. Use the event log and the query profile to find the top 5–10 and optimize those: join strategy, skew, over-wide scans, file layout on Curated. That's far higher-leverage than changing the write mechanism for all 60.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;c) Try Standard performance mode.&lt;/STRONG&gt; If the pipeline is triggered and a few minutes of extra startup latency is acceptable for your SLA, Standard mode is the cheapest lever to test, since it trades startup time for lower cost. Performance-optimized is for when latency matters. For a 40-minute batch job, the extra startup is likely noise.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;d) Benchmark with real numbers.&lt;/STRONG&gt; Don't compare on gut feel. Run both variants on a representative workload and compare DBU usage from &lt;CODE&gt;system.billing.usage&lt;/CODE&gt;. Note that billing data can lag by up to 24 hours [2].&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="language-sql"&gt;SELECT usage_date, sku_name, SUM(usage_quantity) AS dbus
FROM system.billing.usage
WHERE usage_metadata.dlt_pipeline_id IN ('&amp;lt;pipeline_1_id&amp;gt;', '&amp;lt;pipeline_2_id&amp;gt;')
GROUP BY usage_date, sku_name
ORDER BY usage_date;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;H2&gt;Recommendation&lt;/H2&gt;
&lt;P&gt;Stay on the pipelines. Fix the incremental eligibility on the MVs where the data shape allows it, tune the few most expensive flows, and test Standard mode. Only move a specific table to a physical Delta table if you've shown that table is cheaper that way, for example when it has a unique write pattern like a &lt;CODE&gt;MERGE&lt;/CODE&gt;. A wholesale MV-to-overwrite migration is the pattern most likely to repeat what you saw in your other project.&lt;/P&gt;
&lt;H2&gt;References&lt;/H2&gt;
&lt;P&gt;[1] Spark Declarative Pipelines | Databricks on AWS — &lt;A href="https://docs.databricks.com/aws/en/ldp" target="_blank"&gt;https://docs.databricks.com/aws/en/ldp&lt;/A&gt;&lt;BR /&gt;[2] Connect to serverless compute | Databricks on AWS — &lt;A href="https://docs.databricks.com/aws/en/compute/serverless" target="_blank"&gt;https://docs.databricks.com/aws/en/compute/serverless&lt;/A&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
    <pubDate>Thu, 08 Oct 2026 13:06:17 GMT</pubDate>
    <dc:creator>anuj_lathi</dc:creator>
    <dc:date>2026-10-08T13:06:17Z</dc:date>
    <item>
      <title>Serverless pipeline with Materialized Views vs. Delta overwrite tables for ~60 Gold outputs</title>
      <link>https://community.databricks.com/t5/data-engineering/serverless-pipeline-with-materialized-views-vs-delta-overwrite/m-p/172253#M56606</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I'd appreciate some advice from anyone who has worked on a similar setup.&lt;/P&gt;&lt;P&gt;Current setup:&lt;BR /&gt;- One Databricks Job with 2 serverless Lakeflow pipelines and around 60 Gold outputs&lt;BR /&gt;- Pipeline 1 reads Curated tables and builds Materialized Views&lt;BR /&gt;- Pipeline 2 reads from both Pipeline 1's MVs and Curated tables&lt;BR /&gt;- Runtime is about 40 minutes and cost is about $20–25 per run&lt;/P&gt;&lt;P&gt;Proposed change:&lt;BR /&gt;- Remove the MVs and write physical Delta tables using overwrite, reading Curated directly&lt;BR /&gt;- Keep the dependencies defined as it is in existing Pipeline 1 &amp;amp; Pipeline 2&lt;BR /&gt;- Stay on serverless&lt;/P&gt;&lt;P&gt;What I've checked so far:&lt;BR /&gt;- The event log (planning_information) shows COMPLETE_RECOMPUTE for our MVs, so they aren't refreshing incrementally today&lt;BR /&gt;- Serverless doesn't support cache()/persist(), so shared logic can't be reused in memory if each Gold table reads Curated directly&lt;BR /&gt;- The pipeline currently handles dependencies and runs independent flows in parallel automatically&lt;/P&gt;&lt;P&gt;In a different project, a similar MV-to-Delta change ended up increasing both runtime and cost, so I want to be careful here.&lt;/P&gt;&lt;P&gt;My questions:&lt;BR /&gt;1. Since our MVs already do a full recompute, is there any real performance or cost benefit in moving to Delta overwrite?&lt;BR /&gt;2. Has anyone seen runtime or cost go up after a change like this? If so, what was the main cause?&lt;BR /&gt;3. Would you recommend keeping the pipeline and instead looking at incremental refresh (row tracking, change data feed on sources) or Standard performance mode?&lt;/P&gt;&lt;P&gt;Any experience or pointers would be really helpful. Thanks in advance!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2026 08:37:27 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/serverless-pipeline-with-materialized-views-vs-delta-overwrite/m-p/172253#M56606</guid>
      <dc:creator>Navinkumar_K</dc:creator>
      <dc:date>2026-10-08T08:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: Serverless pipeline with Materialized Views vs. Delta overwrite tables for ~60 Gold outputs</title>
      <link>https://community.databricks.com/t5/data-engineering/serverless-pipeline-with-materialized-views-vs-delta-overwrite/m-p/172289#M56619</link>
      <description>&lt;DIV&gt;
&lt;P&gt;&lt;STRONG&gt;Short answer:&lt;/STRONG&gt; if your MVs are already doing a full recompute, swapping them for &lt;CODE&gt;overwrite&lt;/CODE&gt; Delta tables won't give you a real win, and it's likely to cost you more. I'd keep the pipelines, find out why the MVs aren't going incremental, and benchmark before rewriting 60 outputs.&lt;/P&gt;
&lt;H2&gt;1. Is there a benefit to Delta overwrite?&lt;/H2&gt;
&lt;P&gt;A full MV recompute and a &lt;CODE&gt;CREATE OR REPLACE&lt;/CODE&gt;-style overwrite do essentially the same work: read the sources, run the query, and write the full result. You'd be giving up what the pipeline gives you for free and getting no new compute savings in return.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Shared intermediate results.&lt;/STRONG&gt; Pipeline 2 reads Pipeline 1's MVs, so that logic is computed once and read many times. If each Gold table reads Curated directly, every one of them re-executes the shared joins, aggregations and dedups. You're right that serverless has no &lt;CODE&gt;cache()&lt;/CODE&gt;/&lt;CODE&gt;persist()&lt;/CODE&gt;, so there's nothing in memory to compensate. The only way to share work on serverless is to materialize it, and that's what your Pipeline 1 MVs already do.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Dependency and parallelism handling.&lt;/STRONG&gt; The pipeline builds the DAG from table references and runs independent flows concurrently [1]. With plain overwrites you rebuild that yourself as job tasks or notebook orchestration, usually with less parallelism and extra per-task startup and scheduling overhead.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Write amplification.&lt;/STRONG&gt; Overwriting rewrites every file on every run. An MV that is eligible for incremental refresh can avoid that, and you'd lose the option.&lt;/LI&gt;
&lt;/UL&gt;
&lt;H2&gt;2. Why cost and runtime usually go up after this change&lt;/H2&gt;
&lt;P&gt;From what I've seen, it's almost always one of these:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;STRONG&gt;Duplicated upstream logic.&lt;/STRONG&gt; The shared MV layer disappears and every downstream table recomputes it. This is the most common cause.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Lost concurrency.&lt;/STRONG&gt; The orchestration that replaces the pipeline DAG ends up more serial, so wall-clock time rises and you pay for the serverless compute while it waits.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Per-task overhead.&lt;/STRONG&gt; Many small tasks each pay startup, planning and commit costs that the pipeline amortized.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Full rewrites&lt;/STRONG&gt; of large outputs that would otherwise have been incremental.&lt;/LI&gt;
&lt;/OL&gt;
&lt;H2&gt;3. What I'd do instead&lt;/H2&gt;
&lt;P&gt;&lt;STRONG&gt;a) Find out why the MVs recompute.&lt;/STRONG&gt; You already have &lt;CODE&gt;planning_information&lt;/CODE&gt; in the event log. Look at the reason it gives for each MV, because it tells you what blocks incremental refresh. Typical culprits are:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Source tables without row tracking or deletion vectors enabled.&lt;/LI&gt;
&lt;LI&gt;Query constructs or non-deterministic expressions that the incremental planner can't handle.&lt;/LI&gt;
&lt;LI&gt;A cost model decision that a full recompute is cheaper, which is common when most of the source changes every run.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Row tracking and deletion vectors on the Curated tables are the first things I'd check:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="language-sql"&gt;ALTER TABLE catalog.schema.curated_table SET TBLPROPERTIES (
  delta.enableRowTracking = true,
  delta.enableDeletionVectors = true
);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I wouldn't spend time on change data feed for this. Incremental MV refresh doesn't hinge on CDF on the sources. Row tracking is the property to focus on.&lt;/P&gt;
&lt;P&gt;Also be realistic about the workload. If your Curated tables are fully rewritten each load, or most rows change daily, a full recompute may be the right plan and incremental won't help.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;b) Find where the 40 minutes goes.&lt;/STRONG&gt; With ~60 outputs it's rarely evenly spread. Usually a handful of flows dominate. Use the event log and the query profile to find the top 5–10 and optimize those: join strategy, skew, over-wide scans, file layout on Curated. That's far higher-leverage than changing the write mechanism for all 60.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;c) Try Standard performance mode.&lt;/STRONG&gt; If the pipeline is triggered and a few minutes of extra startup latency is acceptable for your SLA, Standard mode is the cheapest lever to test, since it trades startup time for lower cost. Performance-optimized is for when latency matters. For a 40-minute batch job, the extra startup is likely noise.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;d) Benchmark with real numbers.&lt;/STRONG&gt; Don't compare on gut feel. Run both variants on a representative workload and compare DBU usage from &lt;CODE&gt;system.billing.usage&lt;/CODE&gt;. Note that billing data can lag by up to 24 hours [2].&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="language-sql"&gt;SELECT usage_date, sku_name, SUM(usage_quantity) AS dbus
FROM system.billing.usage
WHERE usage_metadata.dlt_pipeline_id IN ('&amp;lt;pipeline_1_id&amp;gt;', '&amp;lt;pipeline_2_id&amp;gt;')
GROUP BY usage_date, sku_name
ORDER BY usage_date;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;H2&gt;Recommendation&lt;/H2&gt;
&lt;P&gt;Stay on the pipelines. Fix the incremental eligibility on the MVs where the data shape allows it, tune the few most expensive flows, and test Standard mode. Only move a specific table to a physical Delta table if you've shown that table is cheaper that way, for example when it has a unique write pattern like a &lt;CODE&gt;MERGE&lt;/CODE&gt;. A wholesale MV-to-overwrite migration is the pattern most likely to repeat what you saw in your other project.&lt;/P&gt;
&lt;H2&gt;References&lt;/H2&gt;
&lt;P&gt;[1] Spark Declarative Pipelines | Databricks on AWS — &lt;A href="https://docs.databricks.com/aws/en/ldp" target="_blank"&gt;https://docs.databricks.com/aws/en/ldp&lt;/A&gt;&lt;BR /&gt;[2] Connect to serverless compute | Databricks on AWS — &lt;A href="https://docs.databricks.com/aws/en/compute/serverless" target="_blank"&gt;https://docs.databricks.com/aws/en/compute/serverless&lt;/A&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 08 Oct 2026 13:06:17 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/serverless-pipeline-with-materialized-views-vs-delta-overwrite/m-p/172289#M56619</guid>
      <dc:creator>anuj_lathi</dc:creator>
      <dc:date>2026-10-08T13:06:17Z</dc:date>
    </item>
  </channel>
</rss>

