<?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: Download Lakehouse Files in Data Engineering</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Download-Lakehouse-Files/m-p/4382353#M6535</link>
    <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/886666"&gt;@VIvMouret&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Try this approach instead of Graphql :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Use the&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;Microsoft Fabric REST API&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;. This allows you to programmatically access and download files by authenticating your app via Microsoft Entra (Azure AD). The process involves:&lt;/SPAN&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;STRONG&gt;App Registration&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;: Register your application in Microsoft Entra ID, assign permissions (e.g.,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Lakehouse.Read.All&lt;/SPAN&gt;&lt;SPAN&gt;), and obtain credentials (Client ID, Client Secret, Tenant ID).&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;STRONG&gt;Authentication&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;: Use these credentials to obtain an access token for API requests.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;STRONG&gt;File Access&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;: Use the Fabric REST API to list files in the Lakehouse and construct URLs for downloading them.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://learn.microsoft.com/en-us/fabric/data-engineering/lakehouse-api" target="_blank" rel="noopener"&gt;https://learn.microsoft.com/en-us/fabric/data-engineering/lakehouse-api&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;Something like this :&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;import requests&lt;/P&gt;&lt;P&gt;file_url = "&lt;A href="https://onelake.dfs.fabric.microsoft.com/" target="_blank" rel="noopener"&gt;https://onelake.dfs.fabric.microsoft.com/&lt;/A&gt;&amp;lt;workspace&amp;gt;/&amp;lt;lakehouse&amp;gt;.lakehouse/path/to/file"&lt;BR /&gt;headers = {"Authorization": f"Bearer {token}"}&lt;/P&gt;&lt;P&gt;response = requests.get(file_url, headers=headers)&lt;BR /&gt;if response.status_code == 200:&lt;BR /&gt;with open("downloaded_file", "wb") as file:&lt;BR /&gt;file.write(response.content)&lt;BR /&gt;print("File downloaded successfully!")&lt;BR /&gt;else:&lt;BR /&gt;print(f"Failed to download file: {response.status_code}")&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;See if this is working&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 27 Jan 2025 11:52:16 GMT</pubDate>
    <dc:creator>nilendraFabric</dc:creator>
    <dc:date>2025-01-27T11:52:16Z</dc:date>
    <item>
      <title>Download Lakehouse Files</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Download-Lakehouse-Files/m-p/4382070#M6522</link>
      <description>&lt;P&gt;Hi everyone!&lt;/P&gt;&lt;P&gt;From a notebook in the default Spark environment, I save a table in the same lakehouse as a file&lt;BR /&gt;I need to create an application that retrieves existing files from the Lakehouse files, in order to extract them, download them, etc...&lt;/P&gt;&lt;P&gt;To do this, I created and monitored the creation of an API for GraphQL, and the creation of a single-page application using React NodeJS.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VIvMouret_0-1737969481422.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1231286i852F8AE920E824B2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VIvMouret_0-1737969481422.png" alt="VIvMouret_0-1737969481422.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am I missing something to achieve my goal here, or do I have what I need?&lt;BR /&gt;While digging around in the topics, I came across these two potential solutions :&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Azure Data Lake Storage Gen2&lt;/LI&gt;&lt;LI&gt;virtual network or local data gateways&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;What do you think I should use ? And if I'm wrong, what should I do instead ?&lt;BR /&gt;Thank you in advance !&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2025 09:24:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Download-Lakehouse-Files/m-p/4382070#M6522</guid>
      <dc:creator>VIvMouret</dc:creator>
      <dc:date>2025-01-27T09:24:36Z</dc:date>
    </item>
    <item>
      <title>Re: Download Lakehouse Files</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Download-Lakehouse-Files/m-p/4382121#M6524</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/886666"&gt;@VIvMouret&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In Microsoft Fabric, data in your Lakehouse is automatically stored in OneLake (backed by Azure Data Lake Storage Gen2). Since you already created a GraphQL API layer, you should be able to query and download files through that endpoint. Your single-page React application can call the GraphQL API to list, extract, and download Lakehouse files.If your application and the API run within Microsoft Fabric or an environment that has direct access to Fabric resources, you do not need additional services.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://learn.microsoft.com/en-us/fabric/data-engineering/connect-apps-api-graphql" target="_blank" rel="noopener"&gt;https://learn.microsoft.com/en-us/fabric/data-engineering/connect-apps-api-graphql&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Data-Science/How-to-get-lakehouse-files-into-Azure-Function/m-p/4073966" target="_blank" rel="noopener"&gt;https://community.fabric.microsoft.com/t5/Data-Science/How-to-get-lakehouse-files-into-Azure-Function/m-p/4073966&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;OneLake provides open access to Fabric items using ADLS Gen2-compatible APIs:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;Use OneLake URIs to reference files in your Lakehouse, e.g.,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;A href="https://onelake.dfs.fabric.microsoft.com/" target="_blank" rel="noopener"&gt;https://onelake.dfs.fabric.microsoft.com/&lt;/A&gt;&amp;lt;workspace&amp;gt;/&amp;lt;item&amp;gt;.lakehouse/&amp;lt;path&amp;gt;/&amp;lt;fileName&amp;gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;Assign appropriate permissions to your application in Azure (e.g., "Storage Blob Data Reader" role for ADLS Gen2)&lt;BR /&gt;&lt;BR /&gt;Thanks&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2025 11:55:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Download-Lakehouse-Files/m-p/4382121#M6524</guid>
      <dc:creator>nilendraFabric</dc:creator>
      <dc:date>2025-01-27T11:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: Download Lakehouse Files</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Download-Lakehouse-Files/m-p/4382242#M6529</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/886666"&gt;@VIvMouret&lt;/a&gt;&amp;nbsp;Please accept the solution if this resolves your query, as it will help community to find the answer quickly&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2025 10:45:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Download-Lakehouse-Files/m-p/4382242#M6529</guid>
      <dc:creator>nilendraFabric</dc:creator>
      <dc:date>2025-01-27T10:45:34Z</dc:date>
    </item>
    <item>
      <title>Re: Download Lakehouse Files</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Download-Lakehouse-Files/m-p/4382267#M6530</link>
      <description>&lt;P&gt;thank you for your quick reply!&lt;BR /&gt;I'm going to test and try with ADLS Gen-2 as I already have the GraphQL API ready.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2025 10:52:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Download-Lakehouse-Files/m-p/4382267#M6530</guid>
      <dc:creator>VIvMouret</dc:creator>
      <dc:date>2025-01-27T10:52:09Z</dc:date>
    </item>
    <item>
      <title>Re: Download Lakehouse Files</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Download-Lakehouse-Files/m-p/4382272#M6532</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/886666"&gt;@VIvMouret&lt;/a&gt;&amp;nbsp;please keep me posted. This is intresting to learn about this usecase.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2025 10:54:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Download-Lakehouse-Files/m-p/4382272#M6532</guid>
      <dc:creator>nilendraFabric</dc:creator>
      <dc:date>2025-01-27T10:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: Download Lakehouse Files</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Download-Lakehouse-Files/m-p/4382304#M6533</link>
      <description>&lt;P&gt;I've just tested your code, but I can't access the "files" properties&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VIvMouret_1-1737976415079.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1231329i7AE458DC0B205A54/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VIvMouret_1-1737976415079.png" alt="VIvMouret_1-1737976415079.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;When I search in "Get data", I don't have direct access to the Lakehouse files&lt;BR /&gt;Will I normally be able to view the files in the Lakehouse?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VIvMouret_0-1737976842713.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1231334iD63B998F2B608928/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VIvMouret_0-1737976842713.png" alt="VIvMouret_0-1737976842713.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Because I can't see them..&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I still need to check that I have read-only permissions for the API&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2025 11:21:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Download-Lakehouse-Files/m-p/4382304#M6533</guid>
      <dc:creator>VIvMouret</dc:creator>
      <dc:date>2025-01-27T11:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: Download Lakehouse Files</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Download-Lakehouse-Files/m-p/4382341#M6534</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/886666"&gt;@VIvMouret&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I have tried the Graphql query too, its not working. So you are correct here that it is not supported, I am trying few other things will share soon.&lt;BR /&gt;&lt;BR /&gt;And it seems like you have only access to tables from GraphQL api , not to files. SO we have to figure out different approach to query files.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2025 11:44:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Download-Lakehouse-Files/m-p/4382341#M6534</guid>
      <dc:creator>nilendraFabric</dc:creator>
      <dc:date>2025-01-27T11:44:16Z</dc:date>
    </item>
    <item>
      <title>Re: Download Lakehouse Files</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Download-Lakehouse-Files/m-p/4382353#M6535</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/886666"&gt;@VIvMouret&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Try this approach instead of Graphql :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Use the&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;Microsoft Fabric REST API&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;. This allows you to programmatically access and download files by authenticating your app via Microsoft Entra (Azure AD). The process involves:&lt;/SPAN&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;STRONG&gt;App Registration&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;: Register your application in Microsoft Entra ID, assign permissions (e.g.,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Lakehouse.Read.All&lt;/SPAN&gt;&lt;SPAN&gt;), and obtain credentials (Client ID, Client Secret, Tenant ID).&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;STRONG&gt;Authentication&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;: Use these credentials to obtain an access token for API requests.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;STRONG&gt;File Access&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;: Use the Fabric REST API to list files in the Lakehouse and construct URLs for downloading them.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://learn.microsoft.com/en-us/fabric/data-engineering/lakehouse-api" target="_blank" rel="noopener"&gt;https://learn.microsoft.com/en-us/fabric/data-engineering/lakehouse-api&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;Something like this :&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;import requests&lt;/P&gt;&lt;P&gt;file_url = "&lt;A href="https://onelake.dfs.fabric.microsoft.com/" target="_blank" rel="noopener"&gt;https://onelake.dfs.fabric.microsoft.com/&lt;/A&gt;&amp;lt;workspace&amp;gt;/&amp;lt;lakehouse&amp;gt;.lakehouse/path/to/file"&lt;BR /&gt;headers = {"Authorization": f"Bearer {token}"}&lt;/P&gt;&lt;P&gt;response = requests.get(file_url, headers=headers)&lt;BR /&gt;if response.status_code == 200:&lt;BR /&gt;with open("downloaded_file", "wb") as file:&lt;BR /&gt;file.write(response.content)&lt;BR /&gt;print("File downloaded successfully!")&lt;BR /&gt;else:&lt;BR /&gt;print(f"Failed to download file: {response.status_code}")&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;See if this is working&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2025 11:52:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Download-Lakehouse-Files/m-p/4382353#M6535</guid>
      <dc:creator>nilendraFabric</dc:creator>
      <dc:date>2025-01-27T11:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: Download Lakehouse Files</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Download-Lakehouse-Files/m-p/4383884#M6590</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/913195"&gt;@nilendraFabric&lt;/a&gt;&lt;/P&gt;&lt;P&gt;I've already followed your first paragraph as a POC&lt;/P&gt;&lt;P&gt;To give you an idea of my code, I made this documentation at the beginning:&lt;/P&gt;&lt;P&gt;&lt;A href="https://learn.microsoft.com/fr-fr/fabric/data-engineering/connect-apps-api-graphql" target="_blank"&gt;https://learn.microsoft.com/en-us/fabric/data-engineering/connect-apps-api-graphql&lt;/A&gt;&lt;BR /&gt;Then I moved on to this one as I was asked along the way:&lt;BR /&gt;&lt;A href="https://learn.microsoft.com/en-us/entra/identity-platform/tutorial-single-page-app-react-prepare-spa?tabs=visual-studio-code" target="_blank"&gt;https://learn.microsoft.com/en-us/entra/identity-platform/tutorial-single-page-app-react-prepare-spa?tabs=visual-studio-code&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The documentation link you sent me doesn't include a query for downloading a file from a Lakehouse,&lt;BR /&gt;And even less in Python, I'm in NodeJS...&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2025 08:39:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Download-Lakehouse-Files/m-p/4383884#M6590</guid>
      <dc:creator>VIvMouret</dc:creator>
      <dc:date>2025-01-28T08:39:22Z</dc:date>
    </item>
    <item>
      <title>Re: Download Lakehouse Files</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Download-Lakehouse-Files/m-p/4384825#M6616</link>
      <description>&lt;P&gt;Update of my problem:&lt;BR /&gt;All the technologies I've seen above (unless I'm mistaken) only serve to update and send new data to a Lakehouse, and that's not what we're looking for here.&lt;/P&gt;&lt;P&gt;To answer my question, which is :&lt;BR /&gt;I need to make the files I've created available to colleagues&lt;/P&gt;&lt;P&gt;Well, to do this, I changed direction: OneLake&lt;/P&gt;&lt;P&gt;I had to assign specific and restricted roles, install OneLake on all the machines so that each PC then had access to the desired folder&lt;BR /&gt;By pushing the files into a new Lakehouse, a new workspace and managing the roles, I was able to export the data.&lt;/P&gt;&lt;P&gt;However, I'm only keeping all this for development, I wouldn't recommend it for production.&lt;/P&gt;&lt;P&gt;I have other ideas for putting the export of Lakehouse files into production, such as with Power Pages, but as I can't find any way of extracting the files at the moment, the idea has been put off.&lt;/P&gt;&lt;P&gt;If anyone comes up with an alternative method, don't hesitate !&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2025 16:57:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Download-Lakehouse-Files/m-p/4384825#M6616</guid>
      <dc:creator>VIvMouret</dc:creator>
      <dc:date>2025-01-28T16:57:16Z</dc:date>
    </item>
  </channel>
</rss>

