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
ZJ
Frequent Visitor

Zip file (having the same name as actual file) from web source not working

Hi All,

 

I am fairly new to Power BI and mainly relying on your tutorials (https://community.powerbi.com/t5/Desktop/Unzip-and-load-csv-from-web-error-quot-we-didn-t-recognize-...)

This solution works quite well, however, recently I encountered a Zip file which has multiple csv files and only one shows up after performing these steps and the Binary content is not readable...

 

When I download it and rename certain files, it works so I assume there is a naming issue, however, I can't figure out how to re-configure Mark White's much appreciated post...

I think I would have to change this part but I cannot figure out how: 

"each if _ <> 67324752 // not the IsValid number? then return a dummy formatter
then BinaryFormat.Record([IsValid = false, Filename="test", Content=null])"

 

And the url to the zip: https://vicroadsopendatastorehouse.vicroads.vic.gov.au/opendata/Road_Safety/ACCIDENT.zip

 

If you can give me to any direction, I really appreciate it 🙂

 

Cheers a lot, hope my question is in the correct form

ZJ

3 REPLIES 3
Greg_Deckler
Super User
Super User

What Connector are you using?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Hi Greg,

 

I am using the Get Data -> Blank Query ->Advanced Editor and type in the code below where the UnzipContents is the function based on Mark White's blog

let
Source = Web.Contents("https://vicroadsopendatastorehouse.vicroads.vic.gov.au/opendata/Road_Safety/ACCIDENT.zip
"),
Files = UnzipContents(Source)
in
Files

 

cheers

ZJ
Frequent Visitor

Just a follow up: I could solve this using python which I cannot use in scheduling but nevertheless it's working

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