Standard Macros in Alteryx

Standard macros in Alteryx are like shortcuts that help people do tasks faster. They group tools together, which makes it easier to do the same type of work over and over again. Using standard macros can save a lot of time and make things look neater. In this blog, we'll show you how to use them to make your work easier. We'll use the dataset to show you how it's done.

Every month, I get the COVID case dataset. Every time I have to go through a data cleaning process to ensure the data type, data conversion, and summarization before analyzing the data as shown below.

We can change this workflow into a standard macro so we don't have to build this workflow again to clean the data when we get a similar file in the future.

Step 1: Right click on the file input and click 'Convert to Macro Input' as shown in the screenshot below.

Step 2: Similarly, right-click on the Browse tool and select 'Convert To Macro Output'.

We can see that the flow has been automatically changed into a standard macro. Now save the macro in the appropriate location. I named my macro as 'Data Cleaning Macro'

Step 3: Let's find out how to use the macro. Suppose you have received a similar file and would like to use the macro for the data cleaning process. Import the file in the workflow. Then right click on the blank space, select 'Insert', then select 'Macro' and select your saved Macro ('Data Cleaning Macro')

Step 4: Establish a connection between the macro, the input file, and the Browse tool, then initiate the workflow. This will trigger the standard macro to execute the data cleaning steps according to our predefined workflow process.

Author:
Nitesh Shrestha
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2024 The Information Lab