【发布时间】:2019-07-11 18:37:09
【问题描述】:
该文档演示了如何为连接的服务创建参数,但没有演示如何从数据集或活动中实际传递该参数。基本上,连接字符串来自查找 foreach 循环,我想连接到存储表。
连接看起来像这样。传入正确的参数时测试有效:
{
"name": "StatsStorage",
"properties": {
"type": "AzureTableStorage",
"parameters": {
"connectionString": {
"type": "String"
}
},
"annotations": [],
"typeProperties": {
"connectionString": "@{linkedService().connectionString}"
}
}
}
数据集如下,我正在努力确定如何为连接设置 connectionString 参数。数据集有两个参数,来自 db 的连接字符串和需要连接的表名:
{
"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"
}
}
}
}
如何在连接上设置连接字符串?
【问题讨论】:
标签: azure azure-data-factory azure-data-factory-2