gpt4 book ai didi

Azure 数据工厂在 Azure Function 主体事件中使用变量

转载 作者:行者123 更新时间:2023-12-03 00:56:16 25 4
gpt4 key购买 nike

更新:

使用字符串数组,我的函数返回:结果:失败异常:ValueError:HTTP 请求不包含有效的 JSON 数据堆栈

<小时/>

我想通过在函数体内传递变量来触发使用数据工厂的 Az 函数。
这是我定义主体的方式:

{
"container": "video-assets",
"latest_files": "@variables('latestFiles')"
}

但是,它似乎不起作用,因为我的函数中的日志显示 {'container': 'video-assets', 'latest_files': "@variables('latestFiles')"}“latestFiles”变量是一个字符串数组。
这是我的小管道:
enter image description here如何在 azure 函数体内传递变量?

最佳答案

我认为你应该尝试这个@json(concat('{"container": "video-assets","latest_files":',variables('latestFiles'),'}'))。它将把 json 字符串转换为 json 对象。
enter image description here

关于Azure 数据工厂在 Azure Function 主体事件中使用变量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68082449/

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