Alert: There is a planned Community maintenance outage October 16th from approximately 10 - 11 PM PST. During this time the Alteryx Community will be inaccessible. Thank you for your understanding!

Engine Works

Under the hood of Alteryx: tips, tricks and how-tos.
smugabart
9 - Comet
9 - Comet

If you've ever struggled with managing the order of operations in your processes, the Control Container tool is here to help!

 

GIF 1 Newsletter 2.gif

 

Why Use Control Containers?

 

Are you curious about how this tool can be useful in your workflow and what benefits it offers? Let me highlight three major advantages that you can't ignore:

 

1. It ensures the right order of events when it is important.

2. You can organize your workflow; it allows you to write multiple outputs in a preferred sequence.

3. It's easier to develop complex workflows because you don’t have to learn advanced concepts like batch macros and chained apps.

 

And yet, are you still not using it...?

 

But What Exactly Is It?

 

Control Containers enable the conditional execution of certain blocks of logic based on data from the workflow, another Control Container, or other tools to build more dynamic and complex processes.

If you need to ensure that one process doesn't start before another finishes, always use multiple Control Containers.

 

AMP Only

 

If the AMP engine is disabled, using the Control Container tool in your workflow will result in an error.

 

How Do You Connect Control Containers?

 

The workflow isn’t working because we didn’t connect the Control Containers properly.

 

Gif1BEZ (1).gif

 

 

Below, you will see how to set it up properly to utilize the control container capabilities:

 

GIF2Z (2).gif

 

If you don’t connect the Control Containers you use in the workflow, you won’t achieve the expected result, and an error will appear. You can notice this in the GIFs above. The first one presents the effect when there is no proper connection between containers, and the second one shows how to set it up correctly.

 

To connect two Control Containers, you have to follow steps similar to those when adding and connecting a new tool to a workflow.

 

2 Anchors: Control Input (Optional) vs Logging Output

 

GIF 2 newsletter 2.gif

 

Control Input (Optional)

 

Think of the Control Input as the starter button for your Control Container. When a single record arrives, it's like pressing that button to get everything going. Once pressed, the container patiently waits for all the records to come through this starting point before it begins its main tasks. This setup makes sure everything is in order before the heavy work starts. 

 

Now, what happens if there's no connection to the Control Input? Simple! The container is activated and functions similarly to a Tool Container.

 

GIF 3 newsletter 2.gif

 

The Logging Output

 

On the other hand, the Logging Output is like having a conversation about what's happening inside the container. It records every detail, displaying all the log messages from the tools within the container and even its sub-containers.

 

These messages only appear in the Control Container data if they're also visible in the Results grid. You only see what’s important.

 

What if the container is turned off? Then it’s quiet—no messages are sent out. This ensures that you’re not cluttering up your workspace with unnecessary data when the container isn’t active.

 

What About the Configuration?

 

GIF 4 newsletter 2.gif

 

  • Just like a Tool Container, you can use a Control Container to group tools. If you move the Control Container, all tools contained in it move together.  
  • It automatically makes space for more tools if you add them.
  • You can change how your Control Container looks. You can pick different colors for the text and borders, adjust the background color, and change how see-through it is. You can even alter its size to fit your needs.

 

Disabled Control Container vs. Enabled Control Container

 

GIF 5 newsletter 2.gif

 

Disabled: Designer ignores the container (as well as all tools within it), and it won't report any configuration errors for them either.

 

Enabled: Designer decides whether to activate it based on records received by the input anchor when you run the workflow.

 

Limitations

 

GIF 6 newsletter 2.gif

 

Control Containers are quite flexible and can work with several types of tools in Alteryx. For example, In-Database tools function properly within Control Containers. Detour Tools also integrate well, although if a Detour End tool is placed inside an inactive Control Container, it drops its data stream. You can use Control Containers effectively within macros.

 

However, not all tools are compatible:

 

  • Interface tools are not supported inside Control Containers.
  • Block Until Done (BUD) tools don't work with Control Containers - an error message will appear.
  • Looped connections generate an error.
  • A Debug Workflow containing Control Containers will produce an error.

 

Being aware of these limitations can help you plan and execute your workflows more effectively without unexpected disruptions.

 

In Conclusion

 

Control Containers are a fantastic way to make your Alteryx workflows more efficient. Whether you're dealing with large datasets or complex sequences, they help ensure everything runs smoothly.

 

Happy Analyzing! 😉

 

Comments