I have some macros that don't work when AMP is on.
Is there a way to stop people using them with AMP on? Is there a way to detect AMP and error out with a message if AMP is on?
Many thanks in advance!
@Hiblet ,
[engine.type] = 1 is without AMP
[engine.type] = 2 is with AMP
you can use a message tool and create an error and stop passing records if AMP is on.
cheers,
Mark
@Hiblet You can turn off the AMP from the Options-User Settings menu
Yes, indeed you can, and thanks for posting. The question is though, can you set a macro so that it is only used in AMP-off mode? If I could detect the current mode in the macro, I could error out and stop the user from running it incorrectly.
Ooh, that is perfect Mark, brilliant! Thank you, very much.
@Hiblet Could you please share the macros? We want to understand the nature of problems with AMP.
Hi @nbond, the macros are not yet tame enough to let loose in public. The problem is that on Server, they generate warnings, but still work correctly. I think it is probably because of the Message tool that I am using. Not a problem as it is a warning, but I wanted to know how to force macros to not run if they have critical AMP sensitivity. I know AMP can effect ordering of data records etc. The macros are Download Tool wrappers that use batch macros to issue web calls one at a time, so that the web service throttling limits are complied with. I use the message tool to let me know that calls are going on one at a time, and for feedback on what the macro is generally up to in real time.
Further to this; I am just getting around to implementing AMP blocking, but I am deciding against it.
The [engine.type] variable is undocumented, and tools do not recognise it during configuration. However, it is a legitimate variable, and can be used in the flow. The value of the variable seems to be a string, at least in 2023.1 that I am using.
When AMP is turned off (Workflow configuration, Runtime tab, "Use AMP Engine" unchecked) the variable is set to "E1". When AMP is on, it is set to "AMP". Given that this is not a documented variable, I would expect Alteryx to retain the right to change type and settings without having to tell us. Therefore, if I were to bind a test into the macro, the variable could change and break the macro.
Instead, I will post a warning in the documentation, not to use AMP
Adding [engine.type] variable was implemented for internal usage only (for testing purpose), this is not officially supported for Alteryx Designer and Server Users, that’s why there is no information about it in the documentation
Yes, I understand that, totally get it. I am not going to use it, because of this. Having a variable like engine.type, exposed, stable and documented, would be very useful. A number of tools behave differently in AMP mode, so being able to detect which mode the flow is in would be very useful.
In addition to the undocumented variable Engine.Type (which would be great to have it officially documented as @Hiblet mentioned), is there also a variable for the Engine Compatibility Mode under AMP Engine (SortedGrouping in XML)?
Using these two variables (assuming there is also a variable for Engine Compatibility Mode), it would be possible to run a workflow either if AMP is off or both AMP and Engine Compatibility Mode is on (or run an AMP enabled workflow only if Engine Compatibility Mode is on in the workflows that utilize Control Containers).
Alternatively, two settings could be added that could be enforced by local Admin:
- A list box with three options to determine under which conditions a workflow can be run (AMP off, AMP on, AMP on with Engine Compatibility Mode).
- A sub-setting to Use AMP Engine for all new workflows:
Use Engine Compatibility Mode for all new AMP Engine enabled workflows.
AMP is the worse! Speed increases aren't worth data integrity, and I've witnessed AMP mess up the most simplest of tasks, like the Running Total tool. AMP can't even tally column totals in this tool. Alteryx got their product to go multi thread, I don't believe they have figured out how to bring it all together again & actual perform analysis on the results in the same flow.