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

前端 未结 2 1927
别那么骄傲
别那么骄傲 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.

    0 讨论(0)
  • 2021-01-21 23:30

    In the New Linked service Azure table storage and Click on Advanced and check 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": [] } }

    0 讨论(0)
提交回复
热议问题