gpt4 book ai didi

Azure数据工厂管道: conditional checking on variable activity

转载 作者:行者123 更新时间:2023-12-02 07:59:39 26 4
gpt4 key购买 nike

我有一个 Web 事件来调用 REST API 并将其输出保存到表中。但其值(value)之一并不总是可用。因此,我们需要在将其输出设置为变量事件时进行条件检查。您可以在变量事件中看到我们是如何做到这一点的。

这是其余 API 输出。

{
"value": {
"id": "464a115fd3cb",
"runId": "464a115fd3cb",
"parameters": {},
"invokedBy": {
"id": "99448303872CU28",
"name": "TRIGGER_TIMESHEET_API",
"invokedByType": "ScheduleTrigger"
},
"isLatest": true
},
"continuationToken": "+RID:~sj5QALRCCB4w5hYAAAAADQ",
"ADFWebActivityResponseHeaders": {
"Pragma": "no-cache"

}

}

这里的“continuationToken”不会成为所有 API 响应的一部分。因此,如果该值在 API 响应中可用,我们需要在变量 Activity 中设置它。在所附的屏幕截图中,您可以看到我们正在设置变量。但如果该 key 在 API 响应中不可用,则会抛出错误。因此,我们正在寻找一种解决方案来检查 JSON 输出中是否存在该 key 。 enter image description here

感谢任何帮助。

最佳答案

我认为您已经差不多达到目标了,请使用“设置变量事件”和“如果条件事件”:

enter image description here

设置变量事件:

enter image description here

判断名称是否为空的If-Condition Activity:

enter image description here

然后您可以配置 True Activity 和 False Activity:

enter image description here

关于Azure数据工厂管道: conditional checking on variable activity,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59052795/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com