Alteryx Designer Desktop Discussions

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

Download a .KML document with a link

JSE
7 - Meteor

Hi, I have been trying to download a .KML document directly from alteryx. I have the URL that if you paste it into Google it downloads the document directly, and I was wondering if I could do this in alteryx automatically and with several documents. 


I attach a flow where you may see both links and what I have been trying.

 

Kind regards,

4 REPLIES 4
Treyson
13 - Pulsar
13 - Pulsar

Hello,

 

This looks like it should work, but I navigated to just the base URL to make sure I wasn't grabbing anything that would mess my world up and I got this message. Is your base URL correct?

 

Treyson_0-1640893850330.png

 

Treyson Marks
Senior Analytics Engineer
JSE
7 - Meteor

Hi Treyson, I do not have that message, if I paste my URL in google it automaticaly downloads a .KML document, try to click any of those links, i do not really know what that is. I believe it should work, however, is there any way you can show me how to download a link into a folder in my computer (or to this workflow would be great).

 

This is the link: http://ovc.catastro.meh.es/Cartografia/WMS/BuscarParcelaGoogle.aspx?RefCat=4328802XG7742N0001TD

 

Kind regards and you four time.

 

Happy new year!

Treyson
13 - Pulsar
13 - Pulsar

Hey @JSE 

 

There are 2 ways to solve this. In the attached example we are downloading the file directly into our Alteryx work stream and it appears in the "downloadData" field. I looked through that XML formatted return and it looks like there is some geospatial information in there, so I assume it's everything we need. I then tried to output to a  .KML file but there are some settings that I don't understand that are specific to KML files. (see below) Also, here is the settings for the download tool in this example:

Treyson_0-1641230541875.png

 

 

The other option is to download to a temp file. This creates a .tmp file in the engine folder for your alteryx instance. You can navigate there and see the file. I am not sure if changing the extension to .kml will work. There is no way that I can see to download as a .KML. I did open the file in a text editor and it gave me the same data (XML) that the option above did. here are the configs for this:

 

Treyson_1-1641230576626.png

 

 

Here is the caveat. Working with KML files is a little tricky. I haven't done any work with them so I am going to call upon @CharlieS to maybe offer some clarification.

 

Here is a thread where they were discussing how to write to a KML file: https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Format-KML-Output/td-p/552179

 

 

Treyson Marks
Senior Analytics Engineer
CharlieS
17 - Castor
17 - Castor

Hey y'all! tag me and I appear! (sometime i feel like Beetlejuice)

 

So yeah, nice work so far, I just added a couple tools so this can write the kml file. What's happening is that we're taking the content from the [DownloadData] field and writing a text file (via csv since it's easy in Alteryx). Then we just need a '.kml' file extension on that (since we know it's a kml file, so we want our file systems to do the same). The problem is that if we configure that in the Output tool, it tries to update the content to the kml support that Alteryx has built in (which is ...limited). So that's why the output is configured as a csv and I use a Formula tool before then to update the entire file path. 

 

I made these edits and attached the workflow. Check it out and let me know what y'all think. 

Labels