<?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 Updating a streaming table in dlt in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/updating-a-streaming-table-in-dlt/m-p/102226#M41026</link>
    <description>&lt;P&gt;Can we update a streaming table in dlt my source and target will be same. That is the update should be made on the same table. If yes then can you guide me how.&lt;BR /&gt;&lt;BR /&gt;I tried append_flow but it just appends data&lt;/P&gt;&lt;P&gt;CDC I am not sure whether we can have both target and source table same there or not&lt;/P&gt;</description>
    <pubDate>Mon, 16 Dec 2024 11:45:37 GMT</pubDate>
    <dc:creator>ashraf1395</dc:creator>
    <dc:date>2024-12-16T11:45:37Z</dc:date>
    <item>
      <title>Updating a streaming table in dlt</title>
      <link>https://community.databricks.com/t5/data-engineering/updating-a-streaming-table-in-dlt/m-p/102226#M41026</link>
      <description>&lt;P&gt;Can we update a streaming table in dlt my source and target will be same. That is the update should be made on the same table. If yes then can you guide me how.&lt;BR /&gt;&lt;BR /&gt;I tried append_flow but it just appends data&lt;/P&gt;&lt;P&gt;CDC I am not sure whether we can have both target and source table same there or not&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 11:45:37 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/updating-a-streaming-table-in-dlt/m-p/102226#M41026</guid>
      <dc:creator>ashraf1395</dc:creator>
      <dc:date>2024-12-16T11:45:37Z</dc:date>
    </item>
    <item>
      <title>Re: Updating a streaming table in dlt</title>
      <link>https://community.databricks.com/t5/data-engineering/updating-a-streaming-table-in-dlt/m-p/102235#M41029</link>
      <description>&lt;P&gt;You can define the CDC flow to update the streaming table. This involves reading from the same table and applying changes.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/97035"&gt;@Dlt&lt;/a&gt;.table(
    name="my_streaming_table",
    comment="This table is updated using CDC",
    table_properties={"quality": "silver"}
)
@dlt.expect_or_drop("valid_data", "column_name IS NOT NULL")
def update_table():
    source_df = dlt.read_stream("my_streaming_table")
    changes_df = source_df.filter("change_type = 'update'")

    return changes_df&lt;/LI-CODE&gt;
&lt;P&gt;Ensure your pipeline is configured to use the CDC functionality. This can be done in the pipeline settings.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 11:59:27 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/updating-a-streaming-table-in-dlt/m-p/102235#M41029</guid>
      <dc:creator>Walter_C</dc:creator>
      <dc:date>2024-12-16T11:59:27Z</dc:date>
    </item>
  </channel>
</rss>

