Azure 逻辑应用程序和数据流 - 删除?和@来自 JSON (XML)

Azure Logic App and Data Flow - Remove ? and @ from JSON (XML)

我创建了一个逻辑应用程序,可以将 XML 转换为 JSON

LogicAppProcess

这项工作 'great',在那部分过程中没有问题 - 但是,这保留了一些 ?和某些列名称中的 @ 符号。然后这在 Azure 数据流中的下游不起作用,因为 @ 符号被拾取为参数..

enter image description here

{"code":"BadRequest","message":"ErrorCode=InvalidTemplate, ErrorMessage=Unable to parse expression 'version'","target":"pipeline/PL_XXXX/runid/XXXX","details":null,"error":null}

关于如何替换 有什么想法吗?和 @ 符号在流程的第一点(逻辑应用程序)或在数据流中容纳这些符号?

这就是数据流代码在脚本元素中看到错误的方式 - ?xml 没有抛出错误,但第一个 @ 抛出错误,并将 @version 显示为错误

"script": "source(output(\n\t\t{?xml} as ({@version} as string, {@encoding} as string),\n\t\trss as ({@version} as string, {@xmlns:cisAbstract} as string...

您可以先使用replace() function in your logic app to replace the ? and @ with null string "". If your data is not string type(such as json object or array or any other type), you can use string()函数将它们转换为字符串,然后执行replace()函数。如下表达式所示:

replace(replace(string(<your data>), '@', ''), '?', '')