Forum Discussion
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-the/td-p/646849)
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
- Greg_Deckler
Community Champion
What Connector are you using?
- ZJFrequent Visitor
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
Filescheers
- ZJFrequent Visitor
Just a follow up: I could solve this using python which I cannot use in scheduling but nevertheless it's working