<?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 Delta Live tables - Refer the output table to load by checking condition for scd type 1 in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/delta-live-tables-refer-the-output-table-to-load-by-checking/m-p/63251#M32201</link>
    <description>&lt;P&gt;I have a scenario to implement using the delta live tables.&lt;/P&gt;&lt;P&gt;I get the id and timestamp column from source and I have to load that into my delta live streaming output table only if the source timestamp for less that the existing value in the output table.&lt;/P&gt;&lt;P&gt;I am getting an error mentioning related to the output table&amp;nbsp; -&amp;gt; "Dataset is defined in the pipeline but could not be resolved"&lt;/P&gt;&lt;P&gt;I am performing the following operations in my notebook.&lt;/P&gt;&lt;P&gt;CREATE LIVE STREAMING VIEW dlt_src_table AS SELECT id,created_dt FROM STREAM(delta table)&lt;/P&gt;&lt;P&gt;CREATE STREAMING LIVE TABLE output&lt;/P&gt;&lt;P&gt;(&amp;nbsp; &amp;nbsp;id INT,&amp;nbsp;&lt;/P&gt;&lt;P&gt;src_min_time TIMESTAMP&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;CREATE TEMPORARY STREAMING LIVE TABLE&amp;nbsp; tmp&lt;/P&gt;&lt;P&gt;AS&lt;/P&gt;&lt;P&gt;SELECT id, created_dt AS&amp;nbsp;src_min_time&lt;/P&gt;&lt;P&gt;FROM STREAM(LIVE.dlt_src_table) src&lt;/P&gt;&lt;P&gt;LEFT JOIN LIVE.Output op&lt;/P&gt;&lt;P&gt;ON src.id = op.id&lt;/P&gt;&lt;P&gt;WHERE&amp;nbsp; op.id IS NULL OR src.created_dt &amp;lt; op.src_min_time&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;APPLY CHANGES INTO LIVE.output&lt;/P&gt;&lt;P&gt;FROM STREAM(LIVE.tmp)&lt;/P&gt;&lt;P&gt;KEYS(id)&lt;/P&gt;&lt;P&gt;SEQUENCE BY&amp;nbsp;src_min_time&lt;/P&gt;&lt;P&gt;STORED AS SCD TYPE 1&lt;/P&gt;&lt;P&gt;Thanks for your help in advance&lt;/P&gt;</description>
    <pubDate>Mon, 11 Mar 2024 15:42:40 GMT</pubDate>
    <dc:creator>kmaley</dc:creator>
    <dc:date>2024-03-11T15:42:40Z</dc:date>
    <item>
      <title>Delta Live tables - Refer the output table to load by checking condition for scd type 1</title>
      <link>https://community.databricks.com/t5/data-engineering/delta-live-tables-refer-the-output-table-to-load-by-checking/m-p/63251#M32201</link>
      <description>&lt;P&gt;I have a scenario to implement using the delta live tables.&lt;/P&gt;&lt;P&gt;I get the id and timestamp column from source and I have to load that into my delta live streaming output table only if the source timestamp for less that the existing value in the output table.&lt;/P&gt;&lt;P&gt;I am getting an error mentioning related to the output table&amp;nbsp; -&amp;gt; "Dataset is defined in the pipeline but could not be resolved"&lt;/P&gt;&lt;P&gt;I am performing the following operations in my notebook.&lt;/P&gt;&lt;P&gt;CREATE LIVE STREAMING VIEW dlt_src_table AS SELECT id,created_dt FROM STREAM(delta table)&lt;/P&gt;&lt;P&gt;CREATE STREAMING LIVE TABLE output&lt;/P&gt;&lt;P&gt;(&amp;nbsp; &amp;nbsp;id INT,&amp;nbsp;&lt;/P&gt;&lt;P&gt;src_min_time TIMESTAMP&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;CREATE TEMPORARY STREAMING LIVE TABLE&amp;nbsp; tmp&lt;/P&gt;&lt;P&gt;AS&lt;/P&gt;&lt;P&gt;SELECT id, created_dt AS&amp;nbsp;src_min_time&lt;/P&gt;&lt;P&gt;FROM STREAM(LIVE.dlt_src_table) src&lt;/P&gt;&lt;P&gt;LEFT JOIN LIVE.Output op&lt;/P&gt;&lt;P&gt;ON src.id = op.id&lt;/P&gt;&lt;P&gt;WHERE&amp;nbsp; op.id IS NULL OR src.created_dt &amp;lt; op.src_min_time&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;APPLY CHANGES INTO LIVE.output&lt;/P&gt;&lt;P&gt;FROM STREAM(LIVE.tmp)&lt;/P&gt;&lt;P&gt;KEYS(id)&lt;/P&gt;&lt;P&gt;SEQUENCE BY&amp;nbsp;src_min_time&lt;/P&gt;&lt;P&gt;STORED AS SCD TYPE 1&lt;/P&gt;&lt;P&gt;Thanks for your help in advance&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2024 15:42:40 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/delta-live-tables-refer-the-output-table-to-load-by-checking/m-p/63251#M32201</guid>
      <dc:creator>kmaley</dc:creator>
      <dc:date>2024-03-11T15:42:40Z</dc:date>
    </item>
  </channel>
</rss>

