由于 AMP Engine 执行多线程处理,当使用“运行命令”工具的多个宏指令写入同一临时文件时,可能会遇到并发性问题。“字段汇总”工具的实现展示了如何避免冲突。
下图描述了并行“字段汇总”工具,每个工具都包含嵌套在 IFS.yxmc 中的“运行命令”工具。

当我们打开宏指令时,我们可以看到“运行命令”工具,该工具可在临时目录中指定一个文件进行输出。

为避免出错,请将“运行命令”工具的配置改为包含 UUID,从而在输入/输出文件名称中的某个位置添加 %uuid%
。通过这种方式,“运行命令”工具的不同实例可以为输入和输出文件提供不同的临时目录。

然后在可能并行运行的“运行命令”工具前添加“操作”工具(问题)。将“操作”工具配置为使用公式更新原始 XML,并设置“更新内部 XML”公式,以将目标工具中的 %uuid% 占位符替换为 UUID。

IFS.yxmc
Google_Analytics.Prep_Query_String.yxmc
UTCDateTimeConverterMacro.yxmc