<?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 Can I load the files based on the data in my table as variable without iterating through each row? in Get Started Discussions</title>
    <link>https://community.databricks.com/t5/get-started-discussions/can-i-load-the-files-based-on-the-data-in-my-table-as-variable/m-p/82074#M8006</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have created this table which contains the data that I need for my source path and target table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="zll_0091_2-1722958875477.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/10167i26CD5F1CE2FB5941/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="zll_0091_2-1722958875477.png" alt="zll_0091_2-1722958875477.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;source_path:&amp;nbsp;/data/customer/sid={sid}/abc=1/attr_provider={attr_prov}/source_data_provider_code={src_prov}/&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="zll_0091_1-1722958858553.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/10166i901716C02C9C5F2F/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="zll_0091_1-1722958858553.png" alt="zll_0091_1-1722958858553.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So basically, the value of each row are connected so I don't need to iterate all over them anymore. I wan&amp;nbsp;&lt;SPAN&gt;to load only the files &lt;/SPAN&gt;&lt;SPAN&gt;that are in the folder that is greater than my max(key). These is the sample structure of my storage:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="zll_0091_3-1722958975973.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/10168i3BF11A1EFE813BDB/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="zll_0091_3-1722958975973.png" alt="zll_0091_3-1722958975973.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;For this example, using the first row of my table, my code should only load the files from&amp;nbsp;folder10023 &amp;amp; folder10054.&lt;/P&gt;&lt;P&gt;Is there any way not to iterate through each rows of the table?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 06 Aug 2024 15:49:08 GMT</pubDate>
    <dc:creator>zll_0091</dc:creator>
    <dc:date>2024-08-06T15:49:08Z</dc:date>
    <item>
      <title>Can I load the files based on the data in my table as variable without iterating through each row?</title>
      <link>https://community.databricks.com/t5/get-started-discussions/can-i-load-the-files-based-on-the-data-in-my-table-as-variable/m-p/82074#M8006</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have created this table which contains the data that I need for my source path and target table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="zll_0091_2-1722958875477.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/10167i26CD5F1CE2FB5941/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="zll_0091_2-1722958875477.png" alt="zll_0091_2-1722958875477.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;source_path:&amp;nbsp;/data/customer/sid={sid}/abc=1/attr_provider={attr_prov}/source_data_provider_code={src_prov}/&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="zll_0091_1-1722958858553.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/10166i901716C02C9C5F2F/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="zll_0091_1-1722958858553.png" alt="zll_0091_1-1722958858553.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So basically, the value of each row are connected so I don't need to iterate all over them anymore. I wan&amp;nbsp;&lt;SPAN&gt;to load only the files &lt;/SPAN&gt;&lt;SPAN&gt;that are in the folder that is greater than my max(key). These is the sample structure of my storage:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="zll_0091_3-1722958975973.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/10168i3BF11A1EFE813BDB/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="zll_0091_3-1722958975973.png" alt="zll_0091_3-1722958975973.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;For this example, using the first row of my table, my code should only load the files from&amp;nbsp;folder10023 &amp;amp; folder10054.&lt;/P&gt;&lt;P&gt;Is there any way not to iterate through each rows of the table?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2024 15:49:08 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/can-i-load-the-files-based-on-the-data-in-my-table-as-variable/m-p/82074#M8006</guid>
      <dc:creator>zll_0091</dc:creator>
      <dc:date>2024-08-06T15:49:08Z</dc:date>
    </item>
    <item>
      <title>Re: Can I load the files based on the data in my table as variable without iterating through each ro</title>
      <link>https://community.databricks.com/t5/get-started-discussions/can-i-load-the-files-based-on-the-data-in-my-table-as-variable/m-p/82412#M8007</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/113366"&gt;@zll_0091&lt;/a&gt;,&amp;nbsp;To efficiently load only the necessary files without manually iterating through each row of your table, you can use Spark's DataFrame operations. First, read your table into a DataFrame and determine the maximum key value. Then, filter the folders based on this key and load the files from the filtered folders. This approach avoids manual row iteration and streamlines the file-loading process.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 15:11:53 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/can-i-load-the-files-based-on-the-data-in-my-table-as-variable/m-p/82412#M8007</guid>
      <dc:creator>Retired_mod</dc:creator>
      <dc:date>2024-08-08T15:11:53Z</dc:date>
    </item>
  </channel>
</rss>

