<?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 Material View to External Delta Table using sink api in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/material-view-to-external-delta-table-using-sink-api/m-p/129631#M48579</link>
    <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;While executing the below code i am able to create the sink and my data is getting written into delta tables from materialized view.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;import dlt&lt;BR /&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/97035"&gt;@Dlt&lt;/a&gt;.table(name = "employee_bronze3")&lt;BR /&gt;def create_table():&lt;BR /&gt;df = spark.read.table("dev.default.employee")&lt;BR /&gt;return df&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/97035"&gt;@Dlt&lt;/a&gt;.table(name = "employee_silver3")&lt;BR /&gt;def create_table():&lt;BR /&gt;df = dlt.read("dev.default.employee_bronze3")&lt;BR /&gt;return df&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;dlt.create_sink(&lt;BR /&gt;name = "delta_sink",&lt;BR /&gt;format = "delta",&lt;BR /&gt;options = {"tableName": "dev.default.employee_test"}&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/97035"&gt;@Dlt&lt;/a&gt;.append_flow(name = "delta_sink_flow", target="delta_sink")&lt;BR /&gt;def delta_sink_flow():&lt;BR /&gt;return(&lt;BR /&gt;dlt.read_stream("dev.default.employee_silver3")&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But if i already have a materialized view created from different dlt and execute the below statement i am getting the error&amp;nbsp;&lt;SPAN&gt;The sink created is giving error due to the below reason : Cannot stream from Materialized View `dev`.`default`.`employee_silver3`. Streaming from Materialized Views is not supported but why am i not getting the error in the above statement.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;dlt.create_sink(&lt;BR /&gt;name = "delta_sink",&lt;BR /&gt;format = "delta",&lt;BR /&gt;options = {"tableName": "dev.default.employee_test"}&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/97035"&gt;@Dlt&lt;/a&gt;.append_flow(name = "delta_sink_flow", target="delta_sink")&lt;BR /&gt;def delta_sink_flow():&lt;BR /&gt;return(&lt;BR /&gt;spark.readStream.table("dev.default.employee_silver3") , I have also tried with spark.read.table("dev.default.employee_silver3")&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone please let me know why this is happening.&lt;/P&gt;</description>
    <pubDate>Mon, 25 Aug 2025 14:17:38 GMT</pubDate>
    <dc:creator>nkrom456</dc:creator>
    <dc:date>2025-08-25T14:17:38Z</dc:date>
    <item>
      <title>Material View to External Delta Table using sink api</title>
      <link>https://community.databricks.com/t5/data-engineering/material-view-to-external-delta-table-using-sink-api/m-p/129631#M48579</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;While executing the below code i am able to create the sink and my data is getting written into delta tables from materialized view.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;import dlt&lt;BR /&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/97035"&gt;@Dlt&lt;/a&gt;.table(name = "employee_bronze3")&lt;BR /&gt;def create_table():&lt;BR /&gt;df = spark.read.table("dev.default.employee")&lt;BR /&gt;return df&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/97035"&gt;@Dlt&lt;/a&gt;.table(name = "employee_silver3")&lt;BR /&gt;def create_table():&lt;BR /&gt;df = dlt.read("dev.default.employee_bronze3")&lt;BR /&gt;return df&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;dlt.create_sink(&lt;BR /&gt;name = "delta_sink",&lt;BR /&gt;format = "delta",&lt;BR /&gt;options = {"tableName": "dev.default.employee_test"}&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/97035"&gt;@Dlt&lt;/a&gt;.append_flow(name = "delta_sink_flow", target="delta_sink")&lt;BR /&gt;def delta_sink_flow():&lt;BR /&gt;return(&lt;BR /&gt;dlt.read_stream("dev.default.employee_silver3")&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But if i already have a materialized view created from different dlt and execute the below statement i am getting the error&amp;nbsp;&lt;SPAN&gt;The sink created is giving error due to the below reason : Cannot stream from Materialized View `dev`.`default`.`employee_silver3`. Streaming from Materialized Views is not supported but why am i not getting the error in the above statement.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;dlt.create_sink(&lt;BR /&gt;name = "delta_sink",&lt;BR /&gt;format = "delta",&lt;BR /&gt;options = {"tableName": "dev.default.employee_test"}&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/97035"&gt;@Dlt&lt;/a&gt;.append_flow(name = "delta_sink_flow", target="delta_sink")&lt;BR /&gt;def delta_sink_flow():&lt;BR /&gt;return(&lt;BR /&gt;spark.readStream.table("dev.default.employee_silver3") , I have also tried with spark.read.table("dev.default.employee_silver3")&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone please let me know why this is happening.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Aug 2025 14:17:38 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/material-view-to-external-delta-table-using-sink-api/m-p/129631#M48579</guid>
      <dc:creator>nkrom456</dc:creator>
      <dc:date>2025-08-25T14:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: Material View to External Delta Table using sink api</title>
      <link>https://community.databricks.com/t5/data-engineering/material-view-to-external-delta-table-using-sink-api/m-p/131139#M48992</link>
      <description>&lt;P&gt;Hi&amp;nbsp;nkrom456,&lt;/P&gt;&lt;P&gt;How are you doing today? as per my understanding, when you use dlt.read_stream() inside the same DLT pipeline, Databricks allows it to stream from that materialized view because everything is being managed within one pipeline — it understands the full flow. But when you try to use spark.readStream.table() to read a materialized view that was created by a different DLT pipeline, it throws an error because streaming from materialized views isn’t supported across pipelines. That’s a Databricks limitation right now. A better way to handle this is to have the first pipeline write to a regular Delta table instead of a materialized view, and then stream from that Delta table in your second pipeline. This keeps things simple and supported. Let me know if you want help updating the code!&lt;/P&gt;</description>
      <pubDate>Sat, 06 Sep 2025 22:50:01 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/material-view-to-external-delta-table-using-sink-api/m-p/131139#M48992</guid>
      <dc:creator>Brahmareddy</dc:creator>
      <dc:date>2025-09-06T22:50:01Z</dc:date>
    </item>
  </channel>
</rss>

