Alteryx Designer Desktop Discussions

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

Beginner level question about Alteryx capability

simpleminded
7 - Meteor

Hi all,

 

I am new to Alteryx here is my problem:

 

So basically I have a root folder say 'vendorList' that folder has 100 folders each folder corresponds to a vendor, say there are three vendor folders for now 'vendor1', 'vendor2', 'vendor3'. Each of these vendor folders can have varying number of subfolders. So vendor1 can have 3 level deep subfolders and vendor2 can be just 1 level deep. In each of these subfolders I am interested in a particular xml file whose name stays the same in all of the vendor folders. Lets call the xml file as bestprice.xml. So I want to reach the bestprice.xml file in all the vendor folders and parse through each xml file looking for a tag called <vendoraddress> and capture the value in that tag.

 

So in the end the output that I am looking for is something like this:

 

Vendor Name FilePath Vendor Address
Vendor1 vendorList\vendor1\files\details\bestprice.xml Address value 1
Vendor2 vendorList\vendor2\details\bestprice.xml Address value 2
Vendor3 vendorList\vendor3\bestprice.xml Address value 3

 

Since as of now I know the basic use of tools in Alteryx I am not sure if Alteryx is the right or wrong tool for this problem. Any algorithm outlining the steps, any explaination of how to go about this or any sample workflow would be of great help. Looking forward to learn from you guys.

5 REPLIES 5
michael_treadwell
ACE Emeritus
ACE Emeritus

The Input tool accepts wildcard characters and there is an option for Search SubDirs

 

There is a great community article on this here: http://community.alteryx.com/t5/Engine-Works-Blog/Inputting-Multiple-Files/ba-p/2083

 

It is with an older version of the product but still applies.

simpleminded
7 - Meteor

Thanks Michael will go through it

jdunkerley79
ACE Emeritus
ACE Emeritus

@michael_treadwell is a good forward.

 

One alternative is to use a Directory Input tool. This will scan for all the matching files.

You can then use a formula tool to get the vendor name

Next group by vendor name to take the first name (you can order by last changed date so get newest)

Feed this into a dynamic input to read the xml (make sure to include the filename in the output).

Finally join the file name to the full path to add the vendors name.

 

While more involved than a wildcarded input tool gives you more control and insight into what is going on.

 

Attached quick demo flow (though it will need configuring with your xml files).

 

 

jdunkerley79
ACE Emeritus
ACE Emeritus

Dupe Post

 

simpleminded
7 - Meteor

Thank you @jdunkerley79. Did few changes as needed but this was a very good solution.

Labels