是否可以在运行时从数据工厂中的Azure函数链接服务内部读取参数?
我需要从ADF管道中动态调用Azure函数 目前,我可以通过Azure函数活动参数化functionName,但无法参数化functionKey或URL URL没有问题,因为我可以在同一URL下存储所有函数,但functionKey确实是必须的 你现在有什么选择吗 我试过的 与DataStoreLinkedServices一样,json中的参数:是否可以在运行时从数据工厂中的Azure函数链接服务内部读取参数?,azure,azure-functions,azure-data-factory,Azure,Azure Functions,Azure Data Factory,我需要从ADF管道中动态调用Azure函数 目前,我可以通过Azure函数活动参数化functionName,但无法参数化functionKey或URL URL没有问题,因为我可以在同一URL下存储所有函数,但functionKey确实是必须的 你现在有什么选择吗 我试过的 与DataStoreLinkedServices一样,json中的参数: { "properties": { "type": "AzureFunction", "annotations
{
"properties": {
"type": "AzureFunction",
"annotations": [],
"parameters": {
"functionSecret": {
"type": "String"
}
},
"typeProperties": {
"functionAppUrl": "https://<myurl>.azurewebsites.net",
"functionKey": {
"type": "AzureKeyVaultSecret",
"store": {
"referenceName": "KeyVaultLinkedService",
"type": "LinkedServiceReference"
},
"secretName": "@{linkedService().functionSecret}"
}
}
}
}
有没有办法做到这一点?这似乎不明显,我在网上也没有发现任何东西。最相似的是我会回答自己,以防有人有同样的问题,我们要做的是从管道本身参数化所需的信息 所以我们有一个管道,它只调用一个通用的Azure函数。在调用方管道中,有一个从KeyVault获取所需参数并将其传递到AF管道的过程 牌照维持如下:
{
"properties": {
"annotations": [],
"type": "AzureFunction",
"typeProperties": {
"functionAppUrl": "https://@{linkedService().functionAppUrl}.azurewebsites.net",
"functionKey": {
"type": "AzureKeyVaultSecret",
"store": {
"referenceName": "KeyVaultLinkedService",
"type": "LinkedServiceReference"
},
"secretName": "@{linkedService().functionKey}"
}
},
"parameters": {
"functionAppUrl": {
"type": "String",
"defaultValue": "@pipeline().parameters.functionAppUrl"
},
"functionKey": {
"type": "String",
"defaultValue": "@pipeline().parameters.functionKey"
}
}
}
}
{
"properties": {
"annotations": [],
"type": "AzureFunction",
"typeProperties": {
"functionAppUrl": "https://@{linkedService().functionAppUrl}.azurewebsites.net",
"functionKey": {
"type": "AzureKeyVaultSecret",
"store": {
"referenceName": "KeyVaultLinkedService",
"type": "LinkedServiceReference"
},
"secretName": "@{linkedService().functionKey}"
}
},
"parameters": {
"functionAppUrl": {
"type": "String",
"defaultValue": "@pipeline().parameters.functionAppUrl"
},
"functionKey": {
"type": "String",
"defaultValue": "@pipeline().parameters.functionKey"
}
}
}
}