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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Johan
Advocate II
Advocate II

PBI Destktop changes M script during upload csv from Azure Datalake

I have a file from azure datalake that is uploaded in PBI.

PBI automatically creates various scripts, li,ke:

 

let
Source = DataLake.Contents("adl://tenant.azuredatalakestore.net/Folder/File.csv"),
Navigation1 = Source{0}[Content],
in
Navigation1

 

However, when refreshing in PBI desktop, the script is transferred to:

 

let
Source = DataLake.Contents("adl://tenant.azuredatalakestore.net/Folder/File.csv"),
Navigation1 = Source{0}[Content],
#"Imported CSV" = Csv.Document(Navigation1,[Delimiter=":", Columns=19, Encoding=1252, QuoteStyle=QuoteStyle.None]),
#"Changed Type" = Table.TransformColumnTypes(#"Imported CSV",{{"Column1", type text}, {"Column2", Int64.Type})
in
#"Changed Type"

 

And this is wrong, it should not change.

 

How to avoid this?

 

Thanks,

Johan

 

1 ACCEPTED SOLUTION
v-sihou-msft
Employee
Employee

@Johan

 

In this scenario, what your first returns just the entire content. Power BI Destkop just detected the delimiter automatically and parse the content to split it into multiple columns. It will always generate that step for CSV source, you can't avoid it. 

 

If you just want to keep the content into one column, I suggest you open that CSV file in Excel, then mauanlly combine those column into a single one, or you can add a step in Query Editor to Merge Columns together. 

 

Regards,

View solution in original post

1 REPLY 1
v-sihou-msft
Employee
Employee

@Johan

 

In this scenario, what your first returns just the entire content. Power BI Destkop just detected the delimiter automatically and parse the content to split it into multiple columns. It will always generate that step for CSV source, you can't avoid it. 

 

If you just want to keep the content into one column, I suggest you open that CSV file in Excel, then mauanlly combine those column into a single one, or you can add a step in Query Editor to Merge Columns together. 

 

Regards,

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.