<?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: Issue listing/Uploading/modifying files in lakehouse using python in Data Engineering</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Issue-listing-Uploading-modifying-files-in-lakehouse-using/m-p/4124793#M3800</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;have you found a solution to this problem? We experiencing exactly the same thing. Our Python Scripts suddenly stop working without changing anything on our site.&lt;/P&gt;</description>
    <pubDate>Thu, 29 Aug 2024 09:56:12 GMT</pubDate>
    <dc:creator>JDT</dc:creator>
    <dc:date>2024-08-29T09:56:12Z</dc:date>
    <item>
      <title>Issue listing/Uploading/modifying files in lakehouse using python</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Issue-listing-Uploading-modifying-files-in-lakehouse-using/m-p/4066795#M3328</link>
      <description>&lt;P class=""&gt;&lt;STRONG&gt;Summary –&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;I have created a Lakehouse in Power BI Service and are trying to&amp;nbsp;&lt;/SPAN&gt;test the connectivity to the Lakehouse via Python following the documentation here:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://learn.microsoft.com/en-us/fabric/onelake/onelake-access-python" target="_blank" rel="noopener"&gt;https://learn.microsoft.com/en-us/&lt;SPAN class=""&gt;fabric&lt;/SPAN&gt;/onelake/onelake-access-python&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;To achieve this, I am using the below code. This should give the output of&amp;nbsp;&lt;/SPAN&gt;list of the files that exist in that specific Lake House.&lt;/LI&gt;&lt;/UL&gt;&lt;P class=""&gt;&lt;SPAN&gt;Code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN&gt;# Install the correct packages first in the same folder as this file.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN&gt;# pip install azure-storage-file-datalake azure-identity&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN&gt;from azure.storage.filedatalake import DataLakeServiceClient, FileSystemClient&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN&gt;from azure.identity import DefaultAzureCredential&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN&gt;# Set your account, workspace, and item path here&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN&gt;ACCOUNT_NAME = "onelake"&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN&gt;WORKSPACE_NAME = "&lt;SPAN class=""&gt;FABRIC&lt;/SPAN&gt;&amp;nbsp;MVP 1 "&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN&gt;DATA_PATH = "/LH_MVP_1.lakehouse/Files/Processed"&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN&gt;def main():&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Create a service client using the default Azure credential&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; account_url = fhttps://{ACCOUNT_NAME}.dfs.&lt;SPAN class=""&gt;fabric&lt;/SPAN&gt;.microsoft.com&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; token_credential = DefaultAzureCredential()&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; service_client = DataLakeServiceClient(account_url, credential=token_credential)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Create a file system client for the workspace&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; file_system_client = service_client.get_file_system_client(WORKSPACE_NAME)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # List a directory within the filesystem&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; paths = file_system_client.get_paths(path=DATA_PATH)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for path in paths:&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print(path.name + '\n')&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN&gt;if __name__ == "__main__":&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; main()&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;When I run the code in VS Code its throwing below error –&lt;BR /&gt;&lt;DIV class=""&gt;&lt;img /&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;I am using service principle, I have relevant client tenants and secrets which have been given and have also given access to the Lake house.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone facing similar issue and suggestions to solve for this please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2024 10:14:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Issue-listing-Uploading-modifying-files-in-lakehouse-using/m-p/4066795#M3328</guid>
      <dc:creator>tajjallarukshan</dc:creator>
      <dc:date>2024-07-29T10:14:37Z</dc:date>
    </item>
    <item>
      <title>Re: Issue listing/Uploading/modifying files in lakehouse using python</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Issue-listing-Uploading-modifying-files-in-lakehouse-using/m-p/4067907#M3338</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="782244" data-lia-user-login="tajjallarukshan" class="lia-mention lia-mention-user"&gt;tajjallarukshan&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The error message "&lt;EM&gt;azure.core.exceptions.ResourceNotFoundError:Artifact'lakehouse' is not found in workspace 'MVP'&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;ErrorCode:ArtifactNotFound&lt;/EM&gt;" indicates that the Lakehouse project cannot be found in the specified workspace.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please check the following aspects:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Double-check the names of your workspace and Lakehouse. Make sure there are no typos or extra spaces.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Verify that the Lakehouse project actually exists in the specified workspace. It is possible that lakehouse is in another workspace.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have any other questions please feel free to contact me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Yang&lt;BR /&gt;Community Support Team&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there is any post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;to help the other members find it more quickly.&lt;BR /&gt;If I misunderstand your needs or you still have problems on it, please feel free to let us know.&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Thanks a lot!&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2024 01:34:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Issue-listing-Uploading-modifying-files-in-lakehouse-using/m-p/4067907#M3338</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-30T01:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: Issue listing/Uploading/modifying files in lakehouse using python</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Issue-listing-Uploading-modifying-files-in-lakehouse-using/m-p/4068575#M3347</link>
      <description>&lt;P&gt;Hi Yang,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had updated the code posted here with different names to maintain integrity of the organization.&lt;/P&gt;&lt;P&gt;I have validated the names for any typos or additional space, but thats not the case.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Copying workspace name from the portal and ensuring to copy name of lakehouse as is has been my approach. So there is no chance of such misses.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, Here is my detailed analysis upon figuring out where the code is creating a problem:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;import&lt;/SPAN&gt; &lt;SPAN&gt;os&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;from&lt;/SPAN&gt; &lt;SPAN&gt;azure&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;identity&lt;/SPAN&gt; &lt;SPAN&gt;import&lt;/SPAN&gt; &lt;SPAN&gt;DefaultAzureCredential&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;from&lt;/SPAN&gt; &lt;SPAN&gt;azure&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;storage&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;filedatalake&lt;/SPAN&gt; &lt;SPAN&gt;import&lt;/SPAN&gt; &lt;SPAN&gt;DataLakeServiceClient&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;# Set your account name and workspace information here&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;ACCOUNT_NAME&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;"onelake"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;DATA_PATH&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;"LH_MVP_1.Lakehouse/Files/Processed/"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;def&lt;/SPAN&gt; &lt;SPAN&gt;list_file_systems&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;service_client&lt;/SPAN&gt;&lt;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;try&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;# Listing file systems might be restricted. We can ensure to handle this error or validate this part&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;file_systems&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;service_client&lt;/SPAN&gt;&lt;SPAN&gt;.list_file_systems()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;for&lt;/SPAN&gt; &lt;SPAN&gt;fs&lt;/SPAN&gt; &lt;SPAN&gt;in&lt;/SPAN&gt; &lt;SPAN&gt;file_systems&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;print&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"File system name:"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;fs&lt;/SPAN&gt;&lt;SPAN&gt;.name)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;except&lt;/SPAN&gt; &lt;SPAN&gt;Exception&lt;/SPAN&gt; &lt;SPAN&gt;as&lt;/SPAN&gt; &lt;SPAN&gt;e&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;print&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"An error occurred while listing file systems:"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;str&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;e&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;def&lt;/SPAN&gt; &lt;SPAN&gt;list_paths&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;file_system_client&lt;/SPAN&gt;&lt;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;try&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;# List paths within the specified folder&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;paths&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;file_system_client&lt;/SPAN&gt;&lt;SPAN&gt;.get_paths(&lt;/SPAN&gt;&lt;SPAN&gt;path&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;DATA_PATH&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;print&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;f&lt;/SPAN&gt;&lt;SPAN&gt;"Listing paths:"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;for&lt;/SPAN&gt; &lt;SPAN&gt;path&lt;/SPAN&gt; &lt;SPAN&gt;in&lt;/SPAN&gt; &lt;SPAN&gt;paths&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;print&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"Path name:"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;path&lt;/SPAN&gt;&lt;SPAN&gt;.name)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;except&lt;/SPAN&gt; &lt;SPAN&gt;Exception&lt;/SPAN&gt; &lt;SPAN&gt;as&lt;/SPAN&gt; &lt;SPAN&gt;e&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;print&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;f&lt;/SPAN&gt;&lt;SPAN&gt;"An error occurred while listing paths"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;str&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;e&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;def&lt;/SPAN&gt; &lt;SPAN&gt;main&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;file_system_name&lt;/SPAN&gt;&lt;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;# Create a service client using the default Azure credential&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;account_url&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;f&lt;/SPAN&gt;&lt;SPAN&gt;"https://&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;ACCOUNT_NAME&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;.dfs.fabric.microsoft.com"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;token_credential&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;DefaultAzureCredential&lt;/SPAN&gt;&lt;SPAN&gt;()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;service_client&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;DataLakeServiceClient&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;account_url&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;credential&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;token_credential&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;# List file systems to test if the service client works fine&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;list_file_systems&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;service_client&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;# Create a file system client&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;file_system_client&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;service_client&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;get_file_system_client&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;file_system_name&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;# List file systems to test if the service client works fine&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;list_paths&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;file_system_client&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;if&lt;/SPAN&gt; &lt;SPAN&gt;__name__&lt;/SPAN&gt; &lt;SPAN&gt;==&lt;/SPAN&gt; &lt;SPAN&gt;"__main__"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;main&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"FABRIC MVP 1"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;Output:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;img /&gt;&lt;P&gt;So this shows:&lt;/P&gt;&lt;P&gt;1. Authentication is successful&lt;/P&gt;&lt;P&gt;2. All workspaces are being listed as file systems successfully&lt;/P&gt;&lt;P&gt;3. But error appears while attempting to list paths inside a specific workspace&lt;BR /&gt;&lt;BR /&gt;Do you know if the format in which the data path is passed is correct here "&lt;SPAN&gt;file_system_client&lt;/SPAN&gt;&lt;SPAN&gt;.get_paths(&lt;/SPAN&gt;&lt;SPAN&gt;path&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;DATA_PATH&lt;/SPAN&gt;&lt;SPAN&gt;)"?&lt;BR /&gt;&lt;BR /&gt;My use case is to upload files to the lakehouse via Python. I followed the approach in this &lt;A href="https://learn.microsoft.com/en-us/fabric/onelake/onelake-access-python" target="_self"&gt;link&lt;/A&gt;, and I was able to successfully list/ upload and update files in lakehouse 2 months ago. But the same code abruptly stopped working just after a week of its successful run. I have a ticket with Microsoft for the same, but its not heading in any direction to get this working.&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 30 Jul 2024 07:33:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Issue-listing-Uploading-modifying-files-in-lakehouse-using/m-p/4068575#M3347</guid>
      <dc:creator>tajjallarukshan</dc:creator>
      <dc:date>2024-07-30T07:33:50Z</dc:date>
    </item>
    <item>
      <title>Re: Issue listing/Uploading/modifying files in lakehouse using python</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Issue-listing-Uploading-modifying-files-in-lakehouse-using/m-p/4071300#M3384</link>
      <description>&lt;P&gt;There is this post in this link -&amp;nbsp;&lt;A href="https://dataroots.io/blog/how-to-use-service-principal-authentication-to-access-microsoft-fabrics-onelake" target="_blank"&gt;How to use service principal authentication to access Microsoft Fabric's OneLake (dataroots.io)&lt;/A&gt;. Can you help me understand if there are these settings at the tenant level that need to be enabled for the service principles to interact appropriately with the OneLake?&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jul 2024 12:24:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Issue-listing-Uploading-modifying-files-in-lakehouse-using/m-p/4071300#M3384</guid>
      <dc:creator>tajjallarukshan</dc:creator>
      <dc:date>2024-07-31T12:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: Issue listing/Uploading/modifying files in lakehouse using python</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Issue-listing-Uploading-modifying-files-in-lakehouse-using/m-p/4124793#M3800</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;have you found a solution to this problem? We experiencing exactly the same thing. Our Python Scripts suddenly stop working without changing anything on our site.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2024 09:56:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Issue-listing-Uploading-modifying-files-in-lakehouse-using/m-p/4124793#M3800</guid>
      <dc:creator>JDT</dc:creator>
      <dc:date>2024-08-29T09:56:12Z</dc:date>
    </item>
    <item>
      <title>Re: Issue listing/Uploading/modifying files in lakehouse using python</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Issue-listing-Uploading-modifying-files-in-lakehouse-using/m-p/4124873#M3801</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have found the cause of it, and it has to do with the nomenclature you follow for naming your lakehouse, workspace and all subsequent objects. They should not have upper case letters or special characters. That solved the problem for us!&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2024 10:59:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Issue-listing-Uploading-modifying-files-in-lakehouse-using/m-p/4124873#M3801</guid>
      <dc:creator>tajjallarukshan</dc:creator>
      <dc:date>2024-08-29T10:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: Issue listing/Uploading/modifying files in lakehouse using python</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Issue-listing-Uploading-modifying-files-in-lakehouse-using/m-p/4173997#M4257</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="782244" data-lia-user-login="tajjallarukshan" class="lia-mention lia-mention-user"&gt;tajjallarukshan&lt;/a&gt;, I'm having the same problem. Even after your comment I tried to create another lakehouse with lower case letters and not special characters and still unable to access or list the paths. I am using the client id, secret and tenant id for the authentication. I am able to print file system name as you are trying in the code and it is working fine. But once I try to upload any file or try to list path then I am getting the same error. Can you please help me out here&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2024 10:54:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Issue-listing-Uploading-modifying-files-in-lakehouse-using/m-p/4173997#M4257</guid>
      <dc:creator>Narayan212</dc:creator>
      <dc:date>2024-09-25T10:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: Issue listing/Uploading/modifying files in lakehouse using python</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Issue-listing-Uploading-modifying-files-in-lakehouse-using/m-p/4207556#M4366</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what I have found out is, that whitespaces,* and | are evil. Do not use them in the workspace and lakehouse name. I couldnt find a clear rule.&amp;nbsp;Even some names that are compliant with ADLS2's naming reference broke for me -&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata" target="_self"&gt;naming-and-referencing-containers--blobs--and-metadata.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2024 11:07:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Issue-listing-Uploading-modifying-files-in-lakehouse-using/m-p/4207556#M4366</guid>
      <dc:creator>JDT</dc:creator>
      <dc:date>2024-10-01T11:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: Issue listing/Uploading/modifying files in lakehouse using python</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Issue-listing-Uploading-modifying-files-in-lakehouse-using/m-p/4207653#M4367</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;My case involved capital letters and spaces in the nomenclature of lakehouse and also the workspace. When I converted everything to lower case without any spaces, it worked absolutely fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This must be with nomenclature only - check for spaces, capital letters and special characters and ensure you dont use these.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2024 11:18:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Issue-listing-Uploading-modifying-files-in-lakehouse-using/m-p/4207653#M4367</guid>
      <dc:creator>tajjallarukshan</dc:creator>
      <dc:date>2024-10-01T11:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: Issue listing/Uploading/modifying files in lakehouse using python</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Issue-listing-Uploading-modifying-files-in-lakehouse-using/m-p/4207663#M4368</link>
      <description>&lt;P&gt;Try creating a new workspace and new lakehouse, add this service principle to the workspace with contributr rights and try again.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2024 11:19:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Issue-listing-Uploading-modifying-files-in-lakehouse-using/m-p/4207663#M4368</guid>
      <dc:creator>tajjallarukshan</dc:creator>
      <dc:date>2024-10-01T11:19:59Z</dc:date>
    </item>
  </channel>
</rss>

