In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Tool Mastery

Explore a diverse compilation of articles that take an in-depth look at Designer tools.
Become a Tool Master

Learn how you can share your expertise with the Community

LEARN MORE

Tool Mastery | Control Container

jrlindem
12 - Quasar
Created

This article is part of the Tool Mastery Series, a compilation of Knowledge Base contributions to introduce diverse working examples for Designer Tools. Here we’ll delve into uses of the Control Container Tool on our way to mastering the Alteryx Designer:

 

 

The Control Container Tool brings dynamic functionality to help build smarter and more flexible workflows.  Introduced with version 2023.1, Control Containers add on to what the existing Tool Container Tool brings to the table but goes far beyond grouping and documenting portions of your workflow.

 

 

Using Control Containers

 

To use Control Containers, the AMP Engine must be enabled.  The tool itself is found within the Developer Tools ribbon:

 

jrlindem_0-1761938404985.png

 

 

 

Tools can either be dragged directly into a Control Container located on the canvas or groups of tools can be highlighted and then placed into a Control Container using the right-click and “Add To New Control Container” option in the pop-up menu.

 

jrlindem_1-1761938404986.png

 

 

 

To remove a Control Container, you can similarly right-click on the container and elect to “Delete Container Only.”

 

Lastly, Control Containers can be enabled or disabled in the same way standard containers behave.  There is a toggle button near the top-left corner of each Control Container.  When toggled off, all tools within the Control Container will be negated.

 

jrlindem_2-1761938404987.png

 

 

 

Now that we know how to introduce them into our workflows and configure them, let’s explore what makes them powerful.

 

 

How Do Control Containers Work?

 

To understand how to use a Control Container, it’s useful for us to consider three key functionalities:

  1. Sequencing Workflows
  2. Using Meta-Data as Data
  3. Conditional Execution.

 

Additionally, when used without connecting to another Control Container, they function just like a standard Tool Container, in that they allow you to group tools, label them, or enable/disable portions of your workflow.

 

Next, we’ll dive deeper into each of the three core capabilities.

 

 

Sequencing Workflows

 

Let’s begin by exploring how Control Containers allow us to control the order of execution within a workflow.  Control Containers allow workflow sections to be sequenced by connecting the containers to each other:

 

jrlindem_3-1761938404989.png

 

 

Notice, in the illustration above, the connections between each of the containers.  Control Containers have the same Input and Output flags that traditional tools do.

 

When Control Containers are connected, upstream tools grouped within a preceding Control Container must complete before the next Control Container’s tools will run.  They are running in series.  In some regards, using this technique can be a more predictable and relatable method than what the Block Until Done Tool offers.  There are times when the Block Until Done Tool may run portions of your workflow in what seems to be “out of order” whereas the Control Container more explicitly abides by the sequencing rules.

 

It’s also worth pointing out that the contained tools can connect across Control Containers (like in Container 2 and Container 3), but they don’t have to (like in Container 1 and Container 2).  This powerful functionality gives you the ability to sequence your tools to ensure they run in the order you want regardless of whether (or not) the streams connect across containers.

 

This is especially useful when you need to ensure large outputs of data are processed before downstream steps begin.

 

 

Using Meta-Data as Data

 

One of the lesser-known capabilities that Control Containers introduced was the ability to peek under the hood and get basic information about the tools being run within the container.  This data can be logged, used in downstream conditions that could affect subsequent portions of the workflows, and/or used to help debug warnings or errors in the workflow.

 

 

jrlindem_4-1761938404991.png

 

 

As shown above, simply connecting a Browse Tool allows you to see the logging output from the tools inside the Control Container.  You aren’t limited, however, to simply viewing this metadata.  This information can also be leveraged further downstream in your workflow.

 

 

Conditional Execution

 

Perhaps the most valuable capability of the Control Container is the ability to execute different streams depending on preceding logical considerations.  To accomplish this, the Filter Tool + Control Container combination can be used to dynamically control outcomes.

 

Consider the following scenario.  In the example below, we are checking source data (src_table) against the database destination (dest_table).  If the data already exists in the destination table, there is no reason to extract and load the data.

 

jrlindem_5-1761938404993.png

 

 

 

To accomplish the conditional behavior, a test is set up in the Formula Tool by checking the [Date] fields from both data sources.  When they are the same, a “True” value is assigned (versus “False” if they are different).

 

When the logic test yields “True,” the Filter Tool passes a row of data into the upper Control Container.  If the test yields “False,” the data flows into the lower stream.

jrlindem_6-1761938404994.png

 

 

When one or many rows of data are fed into a Control Container, that container will activate the tools within it (one time).  Any Control Container that does not get any data fed into it will not be activated at all.  In this way, we are, and as the name implies, controlling which container and therefore tools run based on conditions that come directly from the workflow itself.  Ultimately, making your workflows react dynamically.

 

From there, the possibilities of what you can account for are endless!

 

 

For more information and example workflows, navigate to the Control Container Tool in Alteryx Designer and select “Open Example”

 

jrlindem_7-1761938404995.png

 

 

By now, you should have expert-level proficiency with the Control Container Tool! If you can think of a use case we left out, feel free to use the comments section below! Consider yourself a Tool Master already? Let us know at community@alteryx.com if you’d like your creative tool uses to be featured in the Tool Mastery Series.

 

 

100% rated this as helpful (1/1)
Comments
JoshuaB
Alteryx
Alteryx


Nice job buddy. This is amazing work!

NeoInfiniTech
11 - Bolide

Thank you @jrlindem for this very good read.

 

Two use cases I would like to add:

 

1. Control Container Throttling: Adjustable Delay for Control Containers - Alteryx Designer Desktop Ideas

2. Prevent next container from activating in case of error: When you connect one Control Container to another, if the initial Control Container's input anchor is not connected or is connected to an input and receives at least one record from the connected input, it will activate and the next Control Container will also activate, provided no error handling is added.

 

The screenshot below displays how a basic error handling between two Control Containers can be configured. Most important thing to look out for is to append the Control Container's activation status, as the Control Container might not have been activated and therefore produces no messages at all (including errors). This configuration makes it so that the connected Control Container only activates if the previous Control Container was activated and finished running without errors.

 

 

Spoiler
Control Container Error Handling.png 

 

SIDDINATHAM_HARISH
7 - Meteor

thanks @jrlindem for sharing the most valuable information about tool containers. This is enough information 

caltang
17 - Castor
17 - Castor

Awesome post @jrlindem !

MJ
9 - Comet