<?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: Autoloader ingnore one folder in path in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/autoloader-ignore-one-folder-in-path/m-p/70142#M34015</link>
    <description>&lt;P&gt;oh I see, I know this is one of the limitation of the Autoloader. However, if your file path is different from test and &lt;STRONG&gt;static&lt;/STRONG&gt;. you can increase your path in load() to make sure the load doesn't read from test. for example.&lt;/P&gt;&lt;P&gt;If your prod path is &lt;STRONG&gt;...prod/*/specific_name.json&lt;/STRONG&gt; and your test path is &lt;STRONG&gt;...test/*/specific_name.json&lt;/STRONG&gt;. Then, in load() do load(" ...&lt;STRONG&gt;prod&lt;/STRONG&gt;/*/specific_name.json"). Whatever distinguishes your other path from test is what you use in load() so it will skip the test one. I hope this help or if you can share your full path of the files that would be helpful to see.&lt;/P&gt;</description>
    <pubDate>Tue, 21 May 2024 15:01:22 GMT</pubDate>
    <dc:creator>standup1</dc:creator>
    <dc:date>2024-05-21T15:01:22Z</dc:date>
    <item>
      <title>Autoloader ignore one folder in path</title>
      <link>https://community.databricks.com/t5/data-engineering/autoloader-ignore-one-folder-in-path/m-p/70111#M33995</link>
      <description>&lt;P&gt;Hi everyone!&lt;/P&gt;&lt;P&gt;I am trying to setup Autoloader to read json file with specific name from all subfolders under the path except one.&lt;/P&gt;&lt;P&gt;Could someone advice how this can be achieved?&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, I need to read from .../*/specific_name.json, but ignore test folder&lt;/P&gt;&lt;P&gt;So ../test/../specific_name.json should be ignored&lt;/P&gt;&lt;P&gt;I have tried this GLOB expression, but seems that this one is not working:&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;"&amp;lt;bucket_name&amp;gt;/&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;!(*test*)&lt;/SPAN&gt;&lt;SPAN&gt;/specific_name.json"&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 21 May 2024 14:39:14 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/autoloader-ignore-one-folder-in-path/m-p/70111#M33995</guid>
      <dc:creator>deng_dev</dc:creator>
      <dc:date>2024-05-21T14:39:14Z</dc:date>
    </item>
    <item>
      <title>Re: Autoloader ingnore one folder in path</title>
      <link>https://community.databricks.com/t5/data-engineering/autoloader-ignore-one-folder-in-path/m-p/70123#M34005</link>
      <description>&lt;P&gt;I think you can use &lt;STRONG&gt;REGEXP&lt;/STRONG&gt; to achieve this. This might not be the best way, but it should get the job done. It's all about filtering that file in the df from getting loaded. Try something like this&lt;BR /&gt;df.select(“*”,”_metadata”).select(“*”,”_metadata.file_path”).filter(“file_path not REGEXP ‘/&lt;STRONG&gt;folder_name&lt;/STRONG&gt;/’ “)&lt;/P&gt;&lt;P&gt;Make sure you change the folder name and df to yours.&lt;/P&gt;&lt;P&gt;You can also look into (pathGlobfilter) if the file name is static.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 14:01:12 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/autoloader-ignore-one-folder-in-path/m-p/70123#M34005</guid>
      <dc:creator>standup1</dc:creator>
      <dc:date>2024-05-21T14:01:12Z</dc:date>
    </item>
    <item>
      <title>Re: Autoloader ingnore one folder in path</title>
      <link>https://community.databricks.com/t5/data-engineering/autoloader-ignore-one-folder-in-path/m-p/70135#M34012</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/102950"&gt;@standup1&lt;/a&gt;&amp;nbsp;, thank you for the response. The problem is I need to filter those files before they are loaded with Autoloader, as I need Autoloader to ignore them in schema inference.&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 14:41:44 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/autoloader-ignore-one-folder-in-path/m-p/70135#M34012</guid>
      <dc:creator>deng_dev</dc:creator>
      <dc:date>2024-05-21T14:41:44Z</dc:date>
    </item>
    <item>
      <title>Re: Autoloader ingnore one folder in path</title>
      <link>https://community.databricks.com/t5/data-engineering/autoloader-ignore-one-folder-in-path/m-p/70142#M34015</link>
      <description>&lt;P&gt;oh I see, I know this is one of the limitation of the Autoloader. However, if your file path is different from test and &lt;STRONG&gt;static&lt;/STRONG&gt;. you can increase your path in load() to make sure the load doesn't read from test. for example.&lt;/P&gt;&lt;P&gt;If your prod path is &lt;STRONG&gt;...prod/*/specific_name.json&lt;/STRONG&gt; and your test path is &lt;STRONG&gt;...test/*/specific_name.json&lt;/STRONG&gt;. Then, in load() do load(" ...&lt;STRONG&gt;prod&lt;/STRONG&gt;/*/specific_name.json"). Whatever distinguishes your other path from test is what you use in load() so it will skip the test one. I hope this help or if you can share your full path of the files that would be helpful to see.&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 15:01:22 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/autoloader-ignore-one-folder-in-path/m-p/70142#M34015</guid>
      <dc:creator>standup1</dc:creator>
      <dc:date>2024-05-21T15:01:22Z</dc:date>
    </item>
  </channel>
</rss>

