Alteryx Designer Discussions

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

Parse yxmd as xml to see which tools are used in a module, and how often

8 - Asteroid

I have a slightly unusual request - I want to input (not open) a yxmd module as a text file and parse the xml to see which tools I use, and how many times I use them. So I could input a module, and would get something like this:


Join - 14

Summarise - 4

Browse - 3

Input - 1

Output - 1


When I change .yxmd -> .txt and look at the contents, I can see a structure a bit like this:




Which tool should I use to recognise the above pattern, and save each entry in the line after <Configuration> to a new record? I could then summarize that to find out how often I use each tool. I might need a simple lookup between the xml title <SummarizeFields> and the normal titl (Summarize) but that should be fairly easy to accomplish. However my text file parsing skills aren't good enough to automate the required step. Any help would be much appreciated! Thanks

ACE Emeritus
ACE Emeritus



It may be worth checking out one of the sample macro examples that exists within Alteryx.


Go to Help > Sample Workflows > Use Scripting and automation tools > build a macro > Identify Tools and Macros used in a workflow


This will give you a sample yxdb which runs through a sample macro which gives the level of detail you have described in your post.




You could simply change the directory input with your input file and run the workflow and you should get your desired result.



6 - Meteoroid


do you know, If there is a way to get even list of tools in same order how they go in a flow?