【问题标题】:Error calling the azure function endpoint from azure data factory从 azure 数据工厂调用 azure 函数端点时出错
【发布时间】:2019-06-23 18:48:00
【问题描述】:

我在数据工厂管道中链接了 azure 函数,该管道将文本文件写入 blob 存储 azure 函数在独立执行并将文件写入 blob 存储时工作正常 但是当我从数据工厂运行 azure 函数时,我遇到了下面提到的错误

{
    "errorCode": "3600",
    "message": "Error calling the endpoint.",
    "failureType": "UserError",
    "target": "Azure Function1"
}

我已将 azure 函数配置为使用 blobendpoint 和共享访问签名访问 blob,如下所述

"AzureWebJobsStorage": "DefaultEndpointsProtocol=https;AccountName=XYZ;AccountKey=XYZ;BlobEndpoint=ABC;SharedAccessSignature=AAA"

如果我需要在 blob 存储中进行一些额外的属性更改以从数据工厂成功访问 azure 函数,请告诉我

【问题讨论】:

    标签: azure azure-functions azure-data-factory azure-data-factory-2


    【解决方案1】:

    您的 azure 函数中的触发器是什么? http触发器? 另外,您的天蓝色功能如何受到保护? 如果使用 AAD 进行保护,则需要 Bearer 令牌。 如果您使用的是键,则需要 x 功能键。 https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-http-webhook#authorization-keys

    这是来自第 9 频道的视频,可能会有所帮助:

    从 Azure 数据工厂管道运行 Azure Functions

    https://channel9.msdn.com/Shows/Azure-Friday/Run-Azure-Functions-from-Azure-Data-Factory-pipelines

    【讨论】:

    • 感谢您的回复,是的 azure 函数有输入 http 触发器和输出 blob 触发器
    • Azure 函数链接服务 Azure 函数的返回类型必须是有效的 JObject。 (请记住,JArray 不是 JObject。)除 JObject 之外的任何返回类型都会失败并引发通用用户错误 Error calling endpoint。 docs.microsoft.com/en-us/azure/data-factory/…
    • 我收到同样的错误 { "errorCode": "3600", "message": "Error calling the endpoint.", "failureType": "UserError", "target": "Azure FunctionFinalTest"返回有效的 JObject 后,它可以在一个帐户中正常工作。但是,如果我使用不同的帐户运行相同的数据工厂 azure 函数,则会引发相同的一般错误。
    • 尝试使用不同的管道、帐户来隔离问题,可能是网络问题。
    【解决方案2】:

    ADF 管道中的 Azure 函数活动期望 Azure 函数返回 JSON 对象而不是 HttpResponseMessage。 以下是我们解决它的方法: https://microsoft-bitools.blogspot.com/2019/01/introducing-azure-function-activity-to.html

    【讨论】:

      猜你喜欢
      • 2019-11-24
      • 2020-02-24
      • 2021-08-29
      • 2021-11-15
      • 1970-01-01
      • 2021-03-18
      • 1970-01-01
      • 2020-05-18
      • 1970-01-01
      相关资源
      最近更新 更多