Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Engine Works

Under the hood of Alteryx: tips, tricks and how-tos.
RithiS
Alteryx
Alteryx

 

If you’re an active member of our Alteryx Community, then you may already know that the top Alteryx Designer idea is Control Containers. Posted in 2015, the idea has gathered 270+ likes, 60+ comments and has caused many hours of discussion. It’s been a long time coming, and we are ecstatic to introduce your new favorite tool… Control Containers!

 

Using Tool Containers as a foundation was clear from the beginning, as evidenced by the Community idea. Over 70% of Designer users ran a workflow with a Tool Container in January 2023. There is high familiarity with Tool Containers as they are easy to use for workflow documentation and organization. It was quite a challenge to dive into the container and tool architecture, combine them, and a data processing container tool, but we are very happy with the results!

 

Two important notes: (1) Control Containers work on Server, and (2) they only work with AMP engine.

 

Enterprise Readiness & Benefits

 

New Alteryx users may be asking ‘why Control Containers?’ Simply, users want to be able to control the order of a workflow’s execution. Remember that working in Designer means working with a visual programming language. In programming, it’s vital that your logic executes in a specific order or that only specific conditions trigger downstream logic. Control Containers give you, the visual programmer, new abilities to solve even more complex data and business problems.

 

Enterprise organizations will receive significant value with the new tool. You’ll be able to orchestrate sections of the workflow, integrate with other processes where the order of events is critical, improve testing and auditing processes, and productionize sequenced logic in simpler workflows without having to learn concepts like batch macros and chained apps.

 

Let’s get into the basics and review simple examples now.

 

Control Container Basics

 

Like Tool Containers, you can place tools and sections of the workflow inside to improve organization, but Control Containers come with one input anchor and output anchor each. The anchors are called Control and Log, respectively.

 

image-20230224-203657 (1).png

 

Control (Input) Anchor

 

The Control anchor is how the Alteryx Engine knows when to trigger a Control Container execution. Connecting data to the Control Container will trigger it to execute once all data has been received from upstream (and only if at least one record has been received). This is called activating the Container. Once all the data has been received by the Control anchor, the tools within the Control Container will run. After those tools are completed, data is sent through the Log anchor.

 

This figure shows a Text Input connected to the Control anchor. The container will only run when it receives at least one data record.

 

image-20230223-181439 (1).png

 

 

 

The Control anchor is optional. If there is no incoming connection, then the Control Container is treated like a Tool Container and runs in the order normally determined by the Alteryx Engine. However, it will still output data through the Log anchor. If there is an incoming connection, but no data is received, then the container will not execute. I will show an example at the end of this post.

 

Log (Output) Anchor

 

The Log anchor sends out the engine messages of the contained tools as actual data. This allows messages to be used in downstream tools for activities like auditing and testing.

 

This figure shows an Input Data tool loading a dataset that is passed to a Browse tool. The Log anchor’s data output contains the messages generated by both tools. The data object includes ToolID, MessageType, and Message. ToolID maps to a tool’s ID (surprise!), MessageType maps to the tool’s engine name (which can be viewed in the workflow XML), and Message gives you information from the tool itself (the same messages that normally appear in the Results grid).

 

image-20230313-233449.png

 

Data from the Log anchor can also be used to trigger a second Control Container. This figure shows a Text Input triggering the first container, which then triggers the second container.

 

image-20230224-184005.png

 

For full technical details, check out the Alteryx Help documentation.

 

Use Cases & Examples

 

Now that you have a basic sense of how Control Containers work let’s explore some simple use cases. These examples are also attached so you can download and play with them. They should run successfully with no configuration required.

 

Use Case #1: Writing multiple outputs in a preferred sequence

 

This first use case is like the previous example, but here we are writing out three yxdb files based on our Filters. As you can see in the Results messages, the containers run in order. This is very helpful when writing separate sheets in a single Excel file or following sequenced database operations.

 

image-20230224-191930.png

 

Use Case #2: Writing a new file and using it within the same workflow

 

This example shows that you can easily write a file (existing or new) and then bring that file back into the same workflow and use it downstream. This is primarily helpful if you need specific orders for database operations and the same tables.

 

image-20230224-193139.png

 

Use Case #3: Conditional branching

 

This example checks a dataset for null values. If there is a null value, then the bottom container runs. If there is a connection to the Control anchor, but no data is sent, then the container does not run. This can be used to send alerts or optimize workflow run time. The first figure shows that the bottom container does not execute.

 

image-20230224-202716.png

 

This second figure shows a null in the dataset, so the bottom container executes. Also, notice that each container activates whenever it gets a data record and does not care about the order since they branch from the same tool.

 

image-20230224-202807.png

 

That’s it for three simple use cases! Imagine the possibilities you and your colleagues can do. Be sure to download Alteryx Designer 2023.1 today and let us know how you are using Control Containers!

 

Rithi Son
Product Manager

Rithi started at Alteryx in March 2016 as a product engineer before becoming a product manager in 2019. He has worked as a business and data analyst in ecommerce and health care business intelligence utilizing Excel and SQL. Rithi lives in Denver enjoying life in the Colorado front range.

Rithi started at Alteryx in March 2016 as a product engineer before becoming a product manager in 2019. He has worked as a business and data analyst in ecommerce and health care business intelligence utilizing Excel and SQL. Rithi lives in Denver enjoying life in the Colorado front range.

Comments