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:
- conditional execution
- log data usage
So, what does this all mean?
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
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.
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.
This system of activation-via-input and logging-via-output can be put to very good use, as we will see below.
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:
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.
In case you want to run certain parts of your process based on conditions relating to your data, Control Containers also have you covered.
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
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.
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.
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.