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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
thomas_pike
Frequent Visitor

Ingesting multiple gzip files

We are trying to ingest multiple gzipped CSV files for a project.  We can ingest a single gzipped file with the following:

let
    Source = File.Contents("C:\Users\username\something.csv.gz"),
    Decompressed = Binary.Decompress(Source, Compression.GZip),
    #"Imported CSV" = Csv.Document(Decompressed,[Delimiter=",", Columns=28, Encoding=1252, QuoteStyle=QuoteStyle.None]),
    #"Promoted Headers" = Table.PromoteHeaders(#"Imported CSV", [PromoteAllScalars=true]),
    #"Changed Type" = ....snipped...
in
    #"Changed Type"

And we can import multiple plain CSV files from a directory using the directory source type.  What I can't figure out how to do is to import multiple gzipped files in a directory.  How do we apply the "Binary.Decompress" to each file in a directory as part of the load?

1 ACCEPTED SOLUTION
v-yuezhe-msft
Employee
Employee

@thomas_pike ,

You can create a function in Power BI Desktop as discussed in this similar thread, then invoke this function.

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yuezhe-msft
Employee
Employee

@thomas_pike ,

You can create a function in Power BI Desktop as discussed in this similar thread, then invoke this function.

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors