Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/azure/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
是否可以在运行时从数据工厂中的Azure函数链接服务内部读取参数?_Azure_Azure Functions_Azure Data Factory - Fatal编程技术网

是否可以在运行时从数据工厂中的Azure函数链接服务内部读取参数?

是否可以在运行时从数据工厂中的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

我需要从ADF管道中动态调用Azure函数

目前,我可以通过Azure函数活动参数化functionName,但无法参数化functionKey或URL

URL没有问题,因为我可以在同一URL下存储所有函数,但functionKey确实是必须的

你现在有什么选择吗

我试过的

与DataStoreLinkedServices一样,json中的参数:

{
    "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"
            }
        }
    }
}