Error calling the azure function endpoint from azure data factory

眉间皱痕 提交于 2021-02-05 09:30:07

问题


I have linked azure function in data factory pipeline which writes the text file to blob storage The azure function works fine when executed independently and writes the file to blob storage But i am facing below mentioned error when i run the azure function from data factory

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

I have configured the azure fucntion to access the blob with blobendpoint and shared access signature as mentioned below

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

Please let me know if i need to make some additional properties changes in blob storage to access azure function successfully from data factory


回答1:


What is the trigger in your azure function? http trigger? Also how is your azure function protected? if protected using AAD you need Bearer token. if you are using keys you need x-function key. https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-http-webhook#authorization-keys

Here is a video from channel9 that might help:

Run Azure Functions from Azure Data Factory pipelines

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




回答2:


The Azure Function Activity in the ADF pipeline expects the Azure Function to return a JSON object instead of an HttpResponseMessage. Here is how we solved it: https://microsoft-bitools.blogspot.com/2019/01/introducing-azure-function-activity-to.html



来源:https://stackoverflow.com/questions/54441426/error-calling-the-azure-function-endpoint-from-azure-data-factory

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!