Alteryx 2023.1 comes shipped with Control Containers. I am particularly excited about his new type of container, as it gives users a LOT more power developing dynamic workflows. In short, Control Containers greatly improve:

  • orchestration
  • conditional execution
  • log data usage

So, what does this all mean?

Basics

A Control Container looks almost exactly like a regular Tool Container. The main difference is, that it has its own input and output anchor. When nothing is connected to the Container’s input, it is always considered to be active*. It will activate at the start of the workflow run, let the contained Tools process all data, and then send a log out of its own output and deactivate.

*We are assuming here that the Control Container’s activation toggle on the top left is set to ‘active’, showing blue

No connection: Control Container is always active. In this case, it even activates before the Text Input Tool is done

However, when something IS connected to the Container (i.e. the output of another container, or a regular data stream), the container will only activate once it has received the last record from that connection. It will then proceed to let all contained Tools process data, output a log and deactivate.

Connected: the Control Container activates after the Text Input Tool has output all its records

A Control Container outputs all user facing log messages of the tools it contains. This means messages, warnings, conversion errors and errors, together with the activation and completion messages of the Control Container itself.

Checking the Control Container output Log in the results window of the Browse Tool

This system of activation-via-input and logging-via-output can be put to very good use, as we will see below.

Orchestration

Sometimes you want direct control over which part of your workflow runs first, second, etc. Of course there are things like the Block Until Done Tool, chained Apps and Tools from the Alteryx Community. However, this new Control Container gives you control without workarounds, extra workflows or separate downloads. For instance, you can write to a file first and then read that same file without a lot of hassle:

Two Control Containers are connected through their respective output and input. The second will start working when the first has finished all processing
The results window showing the consecutive execution of each Control Container

In the above example, the first Control Container activates at the start of the workflow run. Once the intermediate output file has been written, the log is sent, followed by the ‘Control Container Completed’ message. This is the last message sent out by the Container, and the connection closes. Since the output of the first Control Container is connected to the input of the second Control Container, the second Control Container will activate after the ‘Completed’ message. The intermediate output file is no longer in use by the Output Data Tool in the first Container and can be read by the Input Data Tool without errors.

Conditional execution

In case you want to run certain parts of your process based on conditions relating to your data, Control Containers also have you covered.

None of the records from the first input file match a specific condition as set in the Filter Tool – no records pass through. This results in the second Input Data Tool not reading its file, as can be seen in the results window of the selected Browse Tool.
The results window showing that the second Control Container never activated, and thus the second Input Data Tool did not read its file.

Log data usage

The Control Container log messages can be treated like regular data in a workflow. This means that users can use these log messages to:

  • store specific parts of the workflow log in a location of their liking, in a file format of their liking
  • use message content to control the execution of downstream control containers

Storing the log

Log data from the Control Container saved to a csv file
Records written to the csv log file

Conditional execution with log data

Sometimes you want to prevent downstream processing from happening based on warnings or error messages from Tools. In the below example, the second Control Container will not run whenever fields from either input of the Join Tool are missing.

A flag is created for all records from the Control Container log. Whenever at least one record matches the missing flag logic the sum will no longer be 0 and will not pass the Filter Tool. This will then prevent the second Control Container from activating.

Prerequisites

There is only one prerequisite for using Control Containers in Alteryx Designer 2023.1: the AMP engine (Alteryx Multi-threaded Processing) needs to be enabled. For Alteryx Designer 2023.1, AMP is enabled by default.

Summary

The new Control Container gives users a lot more power building dynamic workflows. It offers improved orchestration and conditional execution options, as well as usage of log data in workflows.

Banner photo by Kaique Rocha: https://www.pexels.com/photo/man-jumping-on-intermodal-container-379964/


Thank you for reading this blog. Also check out our other blogs page to view more blogs on Tableau, Alteryx, and Snowflake here.

Work together  with one of our consultants and maximize the effects of your data. 

Contact us , and we’ll help you right away.

Tags:

Bel ons

Afspraak

Mail ons