Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Alteryx not opening KML and KMZ files?

mestevez1
8 - Asteroid

Hello,

 

I'm having trouble getting Alteryx to open a KML file from Govt. of Canada site (https://www.ic.gc.ca/eic/site/720.nsf/vwapj/Map_Data_CSV.zip/$file/Map_Data_CSV.zip) This file contains two KMZ file (same file in English and French versions). By unzipping English version we get the National_Broadband_Internet_Service_Availability_Map.kml file.

 

Unfortunately I can't seem to get Alteryx to open it. I suspect the punctuation form Quebec cities (i.e. L'Île-Perrot, La Pocatière) has something to do with that. I'm getting the following error with the KML file:

 

Error: Input Data (1): File Error: XML parsing of KML file failed : not well-formed (invalid token) at line 947, column 14

 

Zip file is attached. Any help is appreciated.

 

Thanks,

 

Mauricio

2 REPLIES 2
CharlieS
17 - Castor
17 - Castor

Hi @mestevez1 

 

You're absolutely right that there are non-supported characters in the default encoding for kml files in Alteryx. Here's what I found when I opened the .kml in Notepad++ on line 947: ("xE9" is the encoding for "é")

 

20200303-UnicodeKML.PNG

 

Since you don't have the option to change the encoding when you read a kml file, I used Alteryx to re-encode the text and save it as a new kml file before reading it. 

 

I Input the kml file, but change the format to a text file so you're just importing text. Then save this text as another kml file using Unicode UTF-8 encoding. Now you can read this new file as a kml with all the characters supported. 

 

20200303-UnicodeKML3.PNG

 

I've attached the workflow I used to convert the kml text and save a new kml file that works just fine in Alteryx. Let me know if this works for you. 

mestevez1
8 - Asteroid

KML Input.PNGThanks @CharlieS! The only thing I needed to do was to configure the first KML input as in the picture, and it worked perfectly.

Labels