Alteryx Designer Desktop Discussions

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

Importing Multiple .xml files from a folder

tf05
Meteoro

I am looking to import multiple .xml files from the same folder.

 

The schemer is slightly different on each as in the name of the file follows a date.

 

MyReport-12-01-21.xml

MyReport-13-01-21.xml

MyReport-14-01-21.xml

and so on.

 

Thanks

11 RESPUESTAS 11
atcodedog05
22 - Nova
22 - Nova

Hi @tf05 

 

Here is how you can do it. Assuming you have all the files in the same folder.

 

1. Replace filename to *.xml or MyReport*.xml 

* means is any character wildcard. This way it will read all the XML files which meet the pattern. Refer highlighted

2. Set the option in the input tool to output filename this will add a column help you keep track of data. Refer highlighted

 

Workflow:

atcodedog05_0-1642154392359.png

 

Hope this helps : )

tf05
Meteoro

Great, thank you. That has read the file although none of the data is pulling through?

 

tf05_0-1642155539209.png

 

atcodedog05
22 - Nova
22 - Nova

Hi @tf05 

 

Is it reading properly when you are reading a single file?

binuacs
Polaris

@atcodedog05 is it because of the slight difference in the files schema? may a bath macro will do the trick?

atcodedog05
22 - Nova
22 - Nova

Hi @binuacs 

 

If the schema is different it will not be read all. Here it's being read but no data. This might be an XML structuring issue in the input file.

tf05
Meteoro

a single file returns no data as well, does this suggest an issue with the XML structuring. Are there any workarounds?

binuacs
Polaris

@atcodedog05 thanks 🙂

atcodedog05
22 - Nova
22 - Nova

Hi @tf05 

 

The issue is with xml input file. Can you provide a sample file so that we can look into it.

tf05
Meteoro

Attached - hopefully I have had to redact it due to data protection, and shorted it as the body was huge, but hopefully the general structure remains

Encuestas
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Etiquetas