Forum Discussion
Optimized Way to download specific files from Azure blob Storage
- 1 year ago
Hi jaryszek,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
Hi jaryszek,
Thank you for reaching out to the Microsoft fabric community forum.
To achieve the best performance when connecting to specific files in Azure Blob Storage via Power Query, it's important to avoid loading the entire container or folder and then filtering afterward. Instead, follow this optimized approach:
Connect to Azure Blob Storage from Power BI using: Home → Get Data → Azure → Azure Blob Storage. After connecting and authenticating, select your container (e.g., container1) and click Transform Data.
In the Power Query editor, you’ll see metadata including Name, Folder Path, Extension, and Content. Apply early filtering (before expanding or transforming), using the Folder Path and Name columns to load only the desired file.
Here's an example for loading only file1 from folder1:
let
Source = AzureStorage.Contents("https://yourstorageaccount.blob.core.windows.net"),
Container = Source{[Name="container1"]}[Content],
Filtered = Table.SelectRows(Container, each [Folder Path] = "https://yourstorageaccount.blob.core.windows.net/container1/folder1/"and [Name] = "file1.csv"),
FileBinary = Filtered{0}[Content],
Data = Csv.Document(FileBinary)
in
Data
This way, each query loads only the specific file it needs, resulting in much better performance and reduced load times.
If you're still facing issues or the structure is more dynamic, feel free to share more details like file types or folder structure we’ll be happy to help you fine tune the query.
Thank you for using the Microsoft Community Forum.
Hi jaryszek,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.