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.
Solucionado! Ir para Solução.
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.
Thanks Michael will go through it
@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).
Dupe Post
Thank you @jdunkerley79. Did few changes as needed but this was a very good solution.