Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Disable/enable a container resulting into a memory limit

daryllj
7 - Meteor

Hi, I need some advice regarding Containers. it's my common issue now developing workflows. Somehow, I cannot disable a Container as it will result to a memory limit. My interface design case is "if I leave this unchecked, do not perform this container."

Usually, my container has a series of tools ending up into a single data stream before merging with other data downstream via Union tool.
Disabling one or a few is somehow resulting into a memory limit to the other tools that are not in the container (or not even related to the disabled data stream). So, the workflow seems not to work midway.

Am I missing something? Should I go with a Detour instead?

5 REPLIES 5
OTrieger
12 - Quasar

@daryllj 
It is hard to say without having a look at the workflow. 

daryllj
7 - Meteor

@OTrieger 
Hi, here's the sample workflow to reproduce the error. I think I may have found the answer. But still, I would like to confirm/know more about this one.

All enabled:

 

Screenshot 2024-09-20 234649.jpg

 


Container B is disabled, result is from Formula tool:

 

Screenshot 2024-09-20 234706.jpg

I'm assuming that since there is no data stream incoming from container B, the formula would create a field without any record. Using Union, it will be automatically aligned by name. However, since there is no data from B, it will be a union of A and C, and skipped B.

 

NeoInfiniTech
11 - Bolide

Hello @daryllj,

 

It is my understanding that Alteryx Designer expects each output to Union to provide data, even if a field with zero records. When you disable a container, it doesn't provide the data, not even with zero fields. For that reason, Designer produces an error if AMP is not enabled, "The input #2 was not initialized." in this case. If AMP is enabled, you simply get a "memory limit reached" warning.

 

If you are developing this workflow as an analytic app or macro where the container may be disabled by a choice the user makes from the interface, my advice would be to set the Action tool to delete the container from the workflow, which is rendered possible by this combination: User input tool (such as check box, radio button, text box etc.) connected to Condition tool, which connects to an Action tool that is connected to the target container that may or may not be deleted based on whether the condition is satisfied.

 

The important thing to look out for is that all the tools (including the final formula tool) connecting to the Union tool must be placed in the Container or the workflow will produce error again as the Union tool won't be able to receive data from the second formula tool.

 

I am providing an example of this in an attachment (DeleteTest.yxwz), where the Condition tool expects that a Check Box is selected by the user to delete the container from the workflow.

 

What's strange is that when AMP Engine is enabled, the second container is not deleted when the workflow is run as an Analytic App although it works fine in debug mode, so I am sharing this workflow without enabling the AMP Engine (on version 2024.1.1.136, I also added Select tools to increase the size of Field1 incoming from Text Input, which is no longer adjusted to max size when the AMP Engine is disabled) and I will be opening a ticket about this issue to Alteryx Support.

 

Please do not enable the AMP Engine for this analytic app for it to function correctly.

 

What works fine however while the AMP Engine is enabled is to configure the container to be disabled instead of deleted (which also causes Alteryx to think that the tools following the Text Input are outside the Control Container although that is not the case) with the combination of using Control Containers (supported for 2023.1 and above), the example of which I am also sharing as an attachment (DeleteTest CC.yxwz).

daryllj
7 - Meteor

Good day @NeoInfiniTech 

Thanks for the sample workflows and additional info. Unfortunately, I don't have the control containers yet as I'm running an older version of the Designer (but will be upgrading to that soon). I can't view properly the app since I need to enable the AMP (required), and this would be my opted approach. But your statements on the first half are very helpful. I was thinking about the same thing. I just didn't know if I'm right or don't know how to put it into words.

NeoInfiniTech
11 - Bolide

You're welcome @daryllj. I also found out that disabling the container instead of deleting it works fine if you are using AMP Engine, so I am going to also share that version as an attachment, although I would strongly recommend that you run multiple tests to ensure that it works as expected, especially if there are more than one containers in the workflow that should be enabled/disabled based on user choice.

Labels