文档演示了如何为连接的服务创建参数,而不是如何从数据集或活动中实际传递该参数。基本上,连接字符串来自lookup foreach循环,我想连接到存储表。
连接看起来像这样。传递正确的参数后,该测试将起作用:
{
"name": "StatsStorage",
"properties": {
"type": "AzureTableStorage",
"parameters": {
"connectionString": {
"type": "String"
}
},
"annotations": [],
"typeProperties": {
"connectionString": "@{linkedService().connectionString}"
}
}
}
数据集如下,我正在努力确定如何设置连接的connectionString参数。数据集具有两个参数,即来自数据库的连接字符串和需要连接至的表名:
{
"name": "TestTable",
"properties": {
"linkedServiceName": {
"referenceName": "StatsStorage",
"type": "LinkedServiceReference"
},
"parameters": {
"ConnectionString": {
"type": "string"
},
"TableName": {
"type": "string"
}
},
"annotations": [],
"type": "AzureTable",
"schema": [],
"typeProperties": {
"tableName": {
"value": "@dataset().TableName",
"type": "Expression"
}
}
}
}
如何在连接上设置连接字符串?
答案 0 :(得分:1)