A macro is described as a workflow that is packaged up into a single Alteryx tool, this means it can be saved, reused, shared and inserted into other workflows!
This is great, as it can standardise processes, as one person can build out the logic for a workflow that others can use. Moreover, this speeds up problem-solving if parts of the process have been completed.
The Alteryx community has videos to learn macros, you can explore this here ()
A few tools in Alteryx are already macros. To have a look at this go to:
Options>User Settings>Canvas>Tick Display Macro Indicators On Tools
Here are examples of tools are macros, you can see now it is indicated with a + icon.
An example we can look at is the Data Cleansing Tool, if you right click, you can open the macro workflow underneath it.
You can do a lot of data cleansing with a formula tool, using TRIM and REGEX. However, within Alteryx there is a data cleanse tool, that has an easy interface to achieve this. The data cleansing tool is actually a nested macro, as there are macros within it! This can make it a slow tool to use, which is something to bear in mind if using within Alteryx.
Types of Macros
Standard Macros are packaged workflows.
A batch macro, is when a process is ran using different subsets of your data.
Iterative macros, is based on a condition in which it will keep looping until it meets a condition to stop.
Macro Repository
You can create a file to store you macros. This can be saved as a tool category, to retrieve the saved macros. To set this up go to:
Options>User Settings>Macros>+>File Path of Folder
Now you are ready to start building macros within Alteryx!