首页 > 解决方案 > 使用 base64 转换的 Azure 数据工厂动态内容

问题描述

我正在从 Azure 数据工厂进行 HTTP 触发的 Azure 函数调用。我无法使函数活动的 HTTP 主体对 HTTP POST 正确。这是 HTTP 正文

{ “文件名”:“@{item().BatchId}.json”,“文件内容”:@{base64(item().BatchId)} }

我传递了两件事:文件名和文件内容,在将其发送到函数之前需要对其进行 base64 编码。base64 函数不适用于 BatchId 的动态值,但文件名在上面的示例中工作正常。

标签: azureazure-data-factoryazure-data-factory-2dynamic-expression

解决方案


It was not working because the BatchId was not a string. Following line started working -

{ "filename": "@{item().BatchId}.json", containername:"insightsfiles", "filecontent": "@{base64(string(item().BatchId)) }"}


推荐阅读