Forum Discussion
Importing .gz file into PowerBi
Currently trying to import .gz file into powerbi using Azure Blob Storage. It's working for .csv files. But not for .gz even though I can see the information in the file I can't click OK.
5 Replies
- freginierSolution Sage
Hey there!
Power BI does not support .gz natively β it needs extraction before importing. You can preview the .gz file but cannot click OK β likely due to Power BI not recognizing the format fully.
Since Power BI cannot directly read compressed files, you can pre-extract it in Azure:
Use an Azure Function or Logic App to extract the .gz file when uploaded.
Save the extracted file as .csv or .txt in another container.
Import the new .csv file into Power BI.Hope this helps!
ππ
- danextianSuper User
Hi yopowerbi
This is a sample custom function I use at work to unzip a gzip file containing a csv in Azure Blob.
let UnzipGZip = (fileName as text) => let sourceFileName = fileName, storageSource = AzureStorage.Blobs("YourStorageAccountName"), container = storageSource{[Name = "YourContainerName"]}[Data], folderPath = Text.Combine( {"https://", "YourStorageAccountName", ".blob.core.windows.net/", "YourContainerName", "/"} ), zipFile = container{[#"Folder Path" = folderPath, Name = sourceFileName]}[Content], importedCSV = Csv.Document( Binary.Decompress(zipFile, Compression.GZip), [Delimiter = ",", Encoding = 1252, QuoteStyle = QuoteStyle.Csv] ), promotedHeaders = Table.PromoteHeaders(importedCSV, [PromoteAllScalars = true]) in promotedHeaders in UnzipGZip - v-echaithraCommunity Support
Hi yopowerbi ,
As we havenβt heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.Regards,
Chaithra. - v-echaithraCommunity Support
Hi yopowerbi ,
May I ask if you have gotten this issue resolved?
If it is solved, please mark the helpful reply or share your solution and accept it as solution, it will be helpful for other members of the community who have similar problems as yours to solve it faster.
Regards,
Chaithra. - v-echaithraCommunity Support
Hi yopowerbi ,
We wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.
Thank you.