How to provide connection string dynamically for azure table storage/blob storage in Azure data factory Linked service

前端 未结 2 1944
别那么骄傲
别那么骄傲 2021-01-21 22:35

Dynamically changing the connection string for Tablestorage or blob storage in Azure data factory. Currently, I could see such option for database related dataset? How to achie

2条回答
  •  既然无缘
    2021-01-21 23:08

    I believe this is what you wanted. https://docs.microsoft.com/en-us/azure/data-factory/parameterize-linked-services As doc mentioned, UI only supports 8 linked service. For others, you could change json code directly following the same pattern.

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

    }

    You can't put the entire connection string as an expression. You need parameterize every part separately. Make sure you noticed the prameters field. And then every time you use the linked service, you will be able to pass different values to it.

提交回复
热议问题