Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

How to read and extract CSV file in Azure Blob?

I have succesfully connected to Azure Storage blob and selected the container and loaded. However I get colums like Name, DateCreated, FolderPath.

 

How to read actual values like "Customer", "Sales" from CSV with Power BI?

1 ACCEPTED SOLUTION
v-huizhn-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

I create a simple csv file, stored it in Azure Blob. In Power BI desktop, I get data from csv file and extract real data. Please follow the following steps.

1. After type the URL and Account Key, please click "Edit", you will turn to Query Edit Navigator as follows.

2.PNG

2. Extend the content(highlighted in black line), you will get the screenshot below. You can design according to your needs, then click "Ok".

3.png
3. You will get the real column data, click "Apply", it will shows in Power BI model.

4.PNG

Here is my Power Query statement.

let
    Source = AzureStorage.Blobs("https://linlstor.blob.core.windows.net/zhang"),
    #"Invoke Custom Function1" = Table.AddColumn(Source, "Transform File from Query1", each #"Transform File from Query1"([Content])),
    #"Renamed Columns1" = Table.RenameColumns(#"Invoke Custom Function1", {"Name", "Source.Name"}),
    #"Invoke Custom Function2" = Table.AddColumn(#"Renamed Columns1", "Transform File from Query1 (2)", each #"Transform File from Query1 (2)"([Content])),
    #"Removed Other Columns1" = Table.SelectColumns(#"Invoke Custom Function2", {"Transform File from Query1 (2)"}),
    #"Expanded Table Column1" = Table.ExpandTableColumn(#"Removed Other Columns1", "Transform File from Query1 (2)", Table.ColumnNames(#"Transform File from Query1 (2)"(#"Sample File (2)"))),
    #"Changed Type" = Table.TransformColumnTypes(#"Expanded Table Column1",{{"Date", type date}, {"Column1", Int64.Type}, {"Column2", Int64.Type}})
in
    #"Changed Type"


Best Regards,
Angelia

View solution in original post

2 REPLIES 2
v-huizhn-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

I create a simple csv file, stored it in Azure Blob. In Power BI desktop, I get data from csv file and extract real data. Please follow the following steps.

1. After type the URL and Account Key, please click "Edit", you will turn to Query Edit Navigator as follows.

2.PNG

2. Extend the content(highlighted in black line), you will get the screenshot below. You can design according to your needs, then click "Ok".

3.png
3. You will get the real column data, click "Apply", it will shows in Power BI model.

4.PNG

Here is my Power Query statement.

let
    Source = AzureStorage.Blobs("https://linlstor.blob.core.windows.net/zhang"),
    #"Invoke Custom Function1" = Table.AddColumn(Source, "Transform File from Query1", each #"Transform File from Query1"([Content])),
    #"Renamed Columns1" = Table.RenameColumns(#"Invoke Custom Function1", {"Name", "Source.Name"}),
    #"Invoke Custom Function2" = Table.AddColumn(#"Renamed Columns1", "Transform File from Query1 (2)", each #"Transform File from Query1 (2)"([Content])),
    #"Removed Other Columns1" = Table.SelectColumns(#"Invoke Custom Function2", {"Transform File from Query1 (2)"}),
    #"Expanded Table Column1" = Table.ExpandTableColumn(#"Removed Other Columns1", "Transform File from Query1 (2)", Table.ColumnNames(#"Transform File from Query1 (2)"(#"Sample File (2)"))),
    #"Changed Type" = Table.TransformColumnTypes(#"Expanded Table Column1",{{"Date", type date}, {"Column1", Int64.Type}, {"Column2", Int64.Type}})
in
    #"Changed Type"


Best Regards,
Angelia

Hi @v-huizhn-msft,

 

Similar to this post using Azure blob storage, Is it possible to run a folder query over multiple csv files stored in a Onedrive for Business folder ?

 

If so, what are the correct settings and syntax for the datasource ?

 

let
    Source = AzureStorage.Blobs("https://linlstor.blob.core.windows.net/zhang"),
    #"Invoke Custom Function1" = Table.AddColumn(Source, "Transform File from Query1", .....

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Users online (9,153)