Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Dynamic Input - XML w/ Child Element

nmosley1
7 - Meteor

I am receiving a directory of XML files with the same schema.  I am able to correctly import a single file by explicitly stating the XML Child Element Name needed to identify the correct grouping of data that will eventually correspond to a table.  That works for a single file but how to work through the entire directory?  I have attempt to use the Dynamic Input, with XML Child Element Name explicitly stated in the configuration, fed by a Directory tool, but I get a message that the schema has changed.  I do not believe the schema is actually different but the Dynamic Input isn't capturing the correct child element after the first file.  Do I need to somehow append the Child Element Name to the file name?  Thinking something similar to an excel file name/ sheet name.  Is this something the Dynamic Input tool cannot handle and I would be better served using a batch macro?

3 REPLIES 3
nmosley1
7 - Meteor

I have attempted to use the batch macro attached below as an alternative to the dynamic input tool .  Appending after my directory tools well. Unfortunately I am unable to attach a copy of the xml data.  The child element that I am targeting is the name of a table not a single field.  The batch macro runs without error but no data is returned instead showing the following message:

 

XML Batch Macro (2) 1 iterations were run (ended by a downstream tool)

 

Looks like the macro is exiting without moving on to the second file?

camerondsteele
6 - Meteoroid

Did you connect anything after the batch macro? If it doesn't have anywhere to send the data (like a browse tool), it will just stop. 

nmosley1
7 - Meteor

Yes!  That was the piece that I was missing.  It makes sense that the batch macro needs an output to write to.  I'm still not sure why the dynamic input approach did not work but the batch macro was quite simple

Labels