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!
Solved! Go to Solution.
@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.
@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
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 @nbondarchuk, 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.