【发布时间】:2019-11-17 20:08:41
【问题描述】:
在 Azure 数据工厂中动态更改 Tablestorage 或 Blob 存储的连接字符串。目前,我可以看到数据库相关数据集的此类选项?如何在 Table 或 Blob 存储中实现相同的功能
【问题讨论】:
标签: azure azure-data-factory azure-data-factory-2
在 Azure 数据工厂中动态更改 Tablestorage 或 Blob 存储的连接字符串。目前,我可以看到数据库相关数据集的此类选项?如何在 Table 或 Blob 存储中实现相同的功能
【问题讨论】:
标签: azure azure-data-factory azure-data-factory-2
我相信这就是你想要的。 https://docs.microsoft.com/en-us/azure/data-factory/parameterize-linked-services 如文档所述,UI 仅支持 8 个链接服务。对于其他人,您可以按照相同的模式直接更改 json 代码。
{
"name": "AzureBlobStorage12",
"type": "Microsoft.DataFactory/factories/linkedservices",
"properties": {
"parameters": {
"accountName": {
"type": "String"
},
"accountKey": {
"type": "String"
}
},
"annotations": [],
"type": "AzureBlobStorage",
"typeProperties": {
"connectionString": "DefaultEndpointsProtocol=https;AccountName=@{linkedService().accountName};AccountKey=@{linkedService().accountKey};EndpointSuffix=core.windows.net;"
}
}
}
您不能将整个连接字符串作为表达式。您需要分别参数化每个部分。确保您注意到参数字段。 然后每次使用链接服务时,您都可以将不同的值传递给它。
【讨论】:
在 New Linked service Azure table storage 中点击 Advanced 并勾选 Specify Dynamic contents in JSON format adf
Copy the below JSON to make it Table Storage Parameterize :
{
"name": "Table",
"type": "Microsoft.DataFactory/factories/linkedservices",
"properties": {
"type": "AzureTableStorage",
"typeProperties": {
"sasUri": {
"type": "SecureString",
"value": "@{linkedService().sasUriParam}"
}
},
"parameters": {
"sasUriParam": {
"type": "String"
}
},
"annotations": []
}
}
【讨论】: