Run Command Tool Workaround with AMP Engine
Due to the AMP engine's multi-threaded processing, you might encounter concurrency issues when multiple macros with Run Command tools write to the same temp file. The Field Summary tool implementation is an example of how you can avoid conflicts.
The image below depicts parallel Field Summary tools that each contain Run Command tools nested within IFS.yxmc.
When we open the macros, we can see the Run Command tool, which specifies a file in the temp directory for output.
To avoid an error, change the configuration of the Run Command tool to include a UUID, adding %uuid%
somewhere in the input/output file names. This way different instances of Run Command tools have different temp directories for input and output files.
Then add an Action tool (Question) in front of the Run Command tools that might run in parallel. Configure the Action tool to Update Raw XML with Formula, and set the Update Inner XML formula to replace the %uuid% placeholder in the destination tool with a UUID.
Affected Alteryx Macros Shipped with Designer
IFS.yxmc
Google_Analytics.Prep_Query_String.yxmc
UTCDateTimeConverterMacro.yxmc