Alteryx Macros came across a few times during our Data School Projects. Macros have many uses or advantages in data analytic projects. For example, Macros come in very handy if you have a challenge with repetitive tasks. Not only that, but previously created Macro can also be reused in other workflows, or you can share among others. As you can see this is a time saver.

In this blog, I will give you a brief introduction to Macros and how to create a Standard Macro.

What is a Macro?

A macro is a workflow or group of tools built into a single tool that can be inserted into another workflow. You can save a macro as a .yxmc file extension. Once saved you can access it from the tool palette, or you can directly access it by right-clicking on the canvas.

At this stage, you may have already used some of the Macros available in Alteryx without knowing it.

How to see existing Macro in Alteryx

Go to Options -> User Settings -> Edit User Settings -> Select Canvas Tab -> Tick Display macro indicators on tools (as shown below)

Now drag select record tool from the Preparation palette and you will notice a little + sign next to the tool. That indicates it is Macro.

Let’s see how this Macro was built by Right-click on the tool and selecting Open Macro (As Shown Below)

The below workflow shows the underline workflow of the Select Record tool as a Macro.

I hope this may give you some understanding of a Macro. Next, see the three main types of Macros in Alteryx.

Types of Macros

Standard Macro: A typical workflow that contains a set of tools

Batch Macro:  Runs for each record or group of records and creates and output from each run and union then together. This Macro requires a Control Parameter tool.

Iterative Macro: Runs through every record until certain conditions are met.

Let’s have a look at how to covert workflow to a macro.

How to Convert workflow to a Macro

  • Go to Configuration Panel -> Workflow Tab -> Macro -> Select the Macro type as Standard, Batch, or Iterative depending on your criteria.
  • Right-click on the input tool and select Convert into Macro Input or Drag macro input tool from the Interface tool pallet. This will automatically change to standard macro. Dragging a control parameter into canvas will create a batch macro.

 

I hope my blog will give you a basic understanding of Macros.