在运行时在Data Factory管道中设置链接服务参数 [英] Setting a Linked Service parameter at runtime in a Data Factory pipeline

查看:107
本文介绍了在运行时在Data Factory管道中设置链接服务参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在运行时将参数传递给Data Factory中的链接服务?

How do I pass in parameters at runtime to a Linked Service in Data Factory?

我在Azure函数链接服务定义中定义并使用了一个参数,但是不确定如何在管道操作的调用过程中设置该参数.在这种情况下,我想在触发器中设置functionAlias来设置Azure Function主机名.当前,(blob创建)触发器返回了一个异常,指出未指定functionAlias.

I have a parameter defined and consumed in my Azure Function linked service definition, but am unsure how I set that during invocation in my pipeline action. In this case I would like to set functionAlias in a trigger to set the Azure Function hostname. Currently an exception is returned on (blob create) trigger stating that functionAlias is not specified.

管道

        {
            "name": "myActivity",
            "type": "AzureFunctionActivity",
            "typeProperties": {
                "functionName": "myFunctionName",
                "method": "POST"
            }
            "linkedServiceName": {
                "referenceName": "myFunctionLinkedService",
                "type": "LinkedServiceReference"
            }
        }

链接服务

{
    "name": "myFunctionLinkedService",
    "type": "Microsoft.DataFactory/factories/linkedservices",
    "properties": {
        "type": "AzureFunction",
        "typeProperties": {
            "functionAppUrl": "https://@{linkedService().functionAlias}.azurewebsites.net",
            "encryptedCredential": ""
        },
        "parameters": {
            "functionAlias": {
                "type": "String"
            }
        }
    }
}

推荐答案

我试图在Data Factory UI中对Azure函数链接服务进行参数化,并得到与您相同的错误,因为参数输入框从未出现过.

I tried to parameterize Azure Function Linked Service in the Data Factory UI and get the same error as same as you because the parameter input box did not show up ever.

然后,我按照官方文档尝试对Azure SQL数据库链接服务进行参数化.

Then I follow the official document to try to parameterize Azure SQL Database Linked Service.

然后我对其进行测试,并按预期显示输入框.

Then I test it and the input box showed up just as I expected.

我检查了文档并找到以下声明.

I check the document and find the below statement.

到目前为止,似乎ADF中的参数化功能仅支持数据存储,但是Azure函数属于Compute,不属于数据存储.(也许将来会支持)

It seems that only data stores are supported by parameterize feature in ADF so far, however Azure Function is belong to Compute,not data stores.(Maybe it will be supported in the furture)

您可以提交反馈或直接与ADF团队联系以进行验证.

You could submit feedback or contact ADF team directly to verify that.

这篇关于在运行时在Data Factory管道中设置链接服务参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆