<?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: How to Apply row_num in DLT in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/how-to-apply-row-num-in-dlt/m-p/109817#M43406</link>
    <description>&lt;P&gt;Hi TakuyaOmi, thanks for your response.&lt;/P&gt;&lt;P&gt;I did try that out, but receiving this kind of error as shown in the image below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dbhavesh_0-1739286611620.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/14802i7C1E7D2FDCAF4B14/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dbhavesh_0-1739286611620.png" alt="dbhavesh_0-1739286611620.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Please let me know your thoughts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
    <pubDate>Tue, 11 Feb 2025 15:10:57 GMT</pubDate>
    <dc:creator>dbhavesh</dc:creator>
    <dc:date>2025-02-11T15:10:57Z</dc:date>
    <item>
      <title>How to Apply row_num in DLT</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-apply-row-num-in-dlt/m-p/109719#M43369</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;how to use row_num in DLT or What is the alternative for row_num function in DLT.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;We are looking for same functionality which row num is doing.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2025 05:49:56 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-apply-row-num-in-dlt/m-p/109719#M43369</guid>
      <dc:creator>dbhavesh</dc:creator>
      <dc:date>2025-02-11T05:49:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to Apply row_num in DLT</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-apply-row-num-in-dlt/m-p/109731#M43374</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/148657"&gt;@dbhavesh&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In DLT, you can achieve similar functionality to the&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;ROW_NUMBER()&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;function in SQL by using the&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;ROW_NUMBER()&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;window function within your DLT pipeline. This can be done using PySpark or SQL syntax within your DLT pipeline code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CREATE&lt;/SPAN&gt; &lt;SPAN&gt;MATERIALIZED&lt;/SPAN&gt; &lt;SPAN&gt;VIEW&lt;/SPAN&gt;&lt;SPAN&gt; bronze_dlt&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;AS&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SELECT&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;*&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;ROW_NUMBER&lt;/SPAN&gt;&lt;SPAN&gt;() &lt;/SPAN&gt;&lt;SPAN&gt;OVER&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;ORDER BY&lt;/SPAN&gt;&lt;SPAN&gt; column1) &lt;/SPAN&gt;&lt;SPAN&gt;AS&lt;/SPAN&gt;&lt;SPAN&gt; row_number&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FROM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;test_wk&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;default&lt;/SPAN&gt;&lt;SPAN&gt;.source_table&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 11 Feb 2025 08:00:29 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-apply-row-num-in-dlt/m-p/109731#M43374</guid>
      <dc:creator>Takuya-Omi</dc:creator>
      <dc:date>2025-02-11T08:00:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to Apply row_num in DLT</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-apply-row-num-in-dlt/m-p/109817#M43406</link>
      <description>&lt;P&gt;Hi TakuyaOmi, thanks for your response.&lt;/P&gt;&lt;P&gt;I did try that out, but receiving this kind of error as shown in the image below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dbhavesh_0-1739286611620.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/14802i7C1E7D2FDCAF4B14/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dbhavesh_0-1739286611620.png" alt="dbhavesh_0-1739286611620.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Please let me know your thoughts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2025 15:10:57 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-apply-row-num-in-dlt/m-p/109817#M43406</guid>
      <dc:creator>dbhavesh</dc:creator>
      <dc:date>2025-02-11T15:10:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to Apply row_num in DLT</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-apply-row-num-in-dlt/m-p/110304#M43538</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/148657"&gt;@dbhavesh&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I apologize for the lack of explanation.&lt;/P&gt;&lt;P&gt;The ROW_NUMBER function requires ordering over the entire dataset, making it a non-time-based window function. When applied to streaming data, it results in the "NON_TIME_WINDOW_NOT_SUPPORTED_IN_STREAMING" error.&lt;/P&gt;&lt;P&gt;This issue occurs specifically in DLT streaming tables because they continuously process incoming data. However, in the case of materialized views, data is processed as a snapshot at a given point in time, allowing ordering without triggering this error.&lt;/P&gt;&lt;P&gt;If you need to generate sequential numbers, consider either:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Using a materialized view instead of a streaming table, or&lt;/LI&gt;&lt;LI&gt;Defining an IDENTITY column in the table schema, which automatically assigns unique sequential numbers upon data insertion.*&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;*&amp;nbsp;&lt;A href="https://docs.databricks.com/en/delta/generated-columns.html#use-identity-columns-in-delta-lake" target="_new" rel="noopener"&gt;Databricks Documentation – Identity Columns in Delta Lake&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Feb 2025 17:57:19 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-apply-row-num-in-dlt/m-p/110304#M43538</guid>
      <dc:creator>Takuya-Omi</dc:creator>
      <dc:date>2025-02-15T17:57:19Z</dc:date>
    </item>
  </channel>
</rss>

