<?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: Unable to get list of files with ABFS path in Data Science</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Science/Unable-to-get-list-of-files-with-ABFS-path/m-p/3748265#M22</link>
    <description>&lt;P&gt;Glad to know your query got resolved. Please continue using Fabric Communty for your further queries.&lt;/P&gt;</description>
    <pubDate>Thu, 07 Mar 2024 09:05:29 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-03-07T09:05:29Z</dc:date>
    <item>
      <title>Unable to get list of files with ABFS path</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Science/Unable-to-get-list-of-files-with-ABFS-path/m-p/3746417#M18</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;i added multiple lakehouses toone notebook.&lt;/P&gt;&lt;P&gt;Now i want to check what is the latest file in a specific folder in each of the lakehouses.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm able to access the data using the 'File API path' of the default Lakehouse:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;list_of_files = glob.glob('/lakehouse/default/Files/.../input/*') 
last_modified_file = max(list_of_files, key=os.path.getmtime)
last_modified_file&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However when i try to do the same with ABFS Path, i dont get a result in list_of_files. It just returns an empty list:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;list_of_files = glob.glob('abfss://.../input/*')
list_of_files&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If i try to read data with the ABFS Path i works without any issue- so i can not be an issue with path/permission:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;df = pd.read_csv('abfss://...input/example.csv',sheet_name="Tabelle1")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea how to make it work that not only the default lakehouse can be accessed but also another as datasource added lakehouses?&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2024 14:55:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Science/Unable-to-get-list-of-files-with-ABFS-path/m-p/3746417#M18</guid>
      <dc:creator>BoSe</dc:creator>
      <dc:date>2024-03-06T14:55:08Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get list of files with ABFS path</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Science/Unable-to-get-list-of-files-with-ABFS-path/m-p/3747976#M19</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="632670" data-lia-user-login="BoSe" class="lia-mention lia-mention-user"&gt;BoSe&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Thanks for using Fabric Community.&lt;BR /&gt;It looks like glob is not able to process it when we are passing the abfs path. This looks like a limitation with glob.&lt;BR /&gt;&lt;BR /&gt;You can also try mssparkutils.fs.ls -&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/azure/synapse-analytics/spark/microsoft-spark-utilities?pivots=programming-language-python#list-files" target="_blank" rel="noopener"&gt;Introduction to Microsoft Spark utilities - Azure Synapse Analytics | Microsoft Learn&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;files = mssparkutils.fs.ls("abfss://5e****dd/Files")
file_paths = [f.path for f in files]
print(file_path)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Hope this is helpful. Please let me know incase of further queries.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 06:52:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Science/Unable-to-get-list-of-files-with-ABFS-path/m-p/3747976#M19</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-03-07T06:52:54Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get list of files with ABFS path</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Science/Unable-to-get-list-of-files-with-ABFS-path/m-p/3748160#M21</link>
      <description>&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;I was able to get the latest file (with all the info), with this addition:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;latest_file = max(files, key=lambda file: file.modifyTime)&lt;/LI-CODE&gt;&lt;P&gt;Thanks for the input.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 08:23:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Science/Unable-to-get-list-of-files-with-ABFS-path/m-p/3748160#M21</guid>
      <dc:creator>BoSe</dc:creator>
      <dc:date>2024-03-07T08:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get list of files with ABFS path</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Science/Unable-to-get-list-of-files-with-ABFS-path/m-p/3748265#M22</link>
      <description>&lt;P&gt;Glad to know your query got resolved. Please continue using Fabric Communty for your further queries.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 09:05:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Science/Unable-to-get-list-of-files-with-ABFS-path/m-p/3748265#M22</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-03-07T09:05:29Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get list of files with ABFS path</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Science/Unable-to-get-list-of-files-with-ABFS-path/m-p/3760472#M23</link>
      <description>&lt;P&gt;You get the path.. but it does not work with abfss path&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2024 11:34:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Science/Unable-to-get-list-of-files-with-ABFS-path/m-p/3760472#M23</guid>
      <dc:creator>zzzsharepoint</dc:creator>
      <dc:date>2024-03-13T11:34:22Z</dc:date>
    </item>
  </channel>
</rss>

