Skip to content

Chapter 1

Part 1: Quick Wins: Building Production-Ready Workflows in Alteryx

Three easy tips that will increase productivity and limit potential errors.

Tip #1 Correct data types

It’s best practice to ensure that you are working with the correct data types as early as possible using the
Select tool.

Correct data types will ensure that you have a good overview of your variables, and will help you avoid wasting time, e.g. by attempting to do numeric operations on strings or using incorrect data types. Some software requires specific data types depending on the data source; for example, exporting TDE-files to Tableau with Unicode characters requires strings to be of the type V_WString. By using this best practice, you can avoid spending precious time on easily fixed problems.

Pro tip

Change the data type of multiple variables of the same type simultaneously:

Highlight the variables of interest -> Options -> Change field Types of Highlighted fields.

You can select or deselect multiple fields at the same time by marking multiple fields -> Options -> Select

Tip #2 Remove duplicates from the join tool

When you use the Join tool to combine two data sources using specific fields that have identical names, Alteryx will assign a prefix to the variables from the right-hand input by default. These values are duplicates, and in most cases, they lead to slower processing and more confusion for you as a user. Best practice is therefore to deselect the duplicate field when using the Join tool.

You might already know the challenge: The case is illustrated below:

Pro tip

You may join on multiple fields, which means that you would have to deselect multiple fields at the same time. As the number of fields increases, the number of duplicated fields also increases. However, you can deselect all the duplicated fields at once by clicking Options -> Deselect Duplicate Fields:

Tip #3 MACROS | Reuse the business logic again and again and…

An Alteryx Macro is a workflow that has the flexibility to run as a single tool within another workflow. There are four types of macros, but here we will introduce the concept of macros and refer to inviso.dk/events for the next training session on Alteryx Macros to get more in depth knowledge.

If you have multiple workflows or multiple data streams where you apply the same logic on an identical approach, it is best practice to make use of macros. Some of the most typical cases in which we build macros are:

  • Apply the same logic on a data stream again and again
  • Web Scrape websites dynamically by browsing through pages using an interactive macro
  • Input an unlimited amount of Excel Spreadsheets that have different layout/format/range.

Example of a standard Macro:

At Inviso, we have published a free and publicly available macro package that can be downloaded from the following link:
https://inviso.dk/blog/post/the-inviso-macro-pack-for-alteryx
Included in this is the Geocoder macro, which we use to obtain the longitude and latitude data for specific addresses. This was a typical case that we frequently came across on different projects and thus, we ended up creating the geocoder macro. The standard workflow would look something like this:

The logic underpinning this workflow can be packaged into a standard workflow that looks similar to the workflow below:

As you may notice, the only difference between the previous standard workflow and the macro above is simply the two tools, “Macro input” and “Macro output”. Hence, once this standard macro is saved, we can use the workflow as a single tool represented below:

Pro tip

Did you know that you can “open” the macros that you have available to see how they are created? Simply right-click on the macro that you want to investigate “behind the scenes”:

Note: Many of the standard tools in Alteryx are in fact macros. Have a look at the “Data Cleansing” tool or the “Create Samples” tool to see how Alteryx applies the best practices that we preach in this white paper.