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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
jaryszek
Impactful Individual
Impactful Individual

Importing .gz file into PowerBi how to do this

How to import into powerBI gz files?

Best,
Jacek

1 ACCEPTED SOLUTION

Hi @jaryszek,

 

Binary.Decompress reads the .gz file into Power Query memory and decompresses it during the data load or refresh. The time it takes depends mainly on the compressed file size, where the file is stored and the memory or the speed of your computer. For most of the files it is very fast, but very large files can take longer because the full uncompressed data has to be kept in the memory while it is processed.

 

If this post helps in resolving the issue, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

 

Thanks and regards,

Anjan Kumar Chippa

View solution in original post

5 REPLIES 5
v-achippa
Community Support
Community Support

Hi @jaryszek,

 

Thank you for reaching out to Microsoft Fabric Community.

 

Power BI Desktop and Power Query do not natively read .gz files directly, they can read the uncompressed data inside like .csv or .json. Power bi can load a .gz file directly if it is a standard gzip-compressed csv.

  • Open Power BI Desktop --> Get data --> Blank query. In the query editor choose Advanced Editor and paste the below M code:

    let

        Source = File.Contents("file path"),

        Decompressed = Binary.Decompress(Source, Compression.GZip),

        CSV = Csv.Document(Decompressed, [Delimiter=",", Encoding=65001, QuoteStyle=QuoteStyle.Csv])

    in

        CSV

  • Update the file path to the .gz file and click Done.

This decompresses the .gz and parses the csv in one step without needing external tools. If the .gz contains something other than a single csv file like for example .tar.gz archive, it must be extracted before importing into power bi.

 

 

If this post helps in resolving the issue, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

 

Thanks and regards,

Anjan Kumar Chippa

jaryszek
Impactful Individual
Impactful Individual

Hi,

thanks.

How this function : Binary.Decompress is working? It is decompressing file inside power query memory? 
What it is a time for it? 

Best,
Jacek

Hi @jaryszek,

 

Binary.Decompress reads the .gz file into Power Query memory and decompresses it during the data load or refresh. The time it takes depends mainly on the compressed file size, where the file is stored and the memory or the speed of your computer. For most of the files it is very fast, but very large files can take longer because the full uncompressed data has to be kept in the memory while it is processed.

 

If this post helps in resolving the issue, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

 

Thanks and regards,

Anjan Kumar Chippa

SamWiseOwl
Super User
Super User

Hi @jaryszek 
This post suggests you can do it from Azure.
https://community.fabric.microsoft.com/t5/Desktop/Importing-gz-file-into-PowerBi/td-p/4592960
I can't confirm that but I've attached an example of a csv compressed to gaz.

 

I've attached the csv as a zip as gz and csv aren't supported on this platform.


If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

jaryszek
Impactful Individual
Impactful Individual

Thanks

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.