列名称中包含 @ 的 Azure 数据工厂数据集



我有一个来自 Rest Web 服务的数据集,列名中有一个 @: 喜欢:{ data[{ @id : 1, @value : "a" }, { @id : 2, @value : "b" } ] }

我想在 foreach 中使用它并访问特定列: 在 foreach 中,我得到的输出如下@activity('Lookup').output.value

在 foreach 中有一个存储过程 作为参数输入,我尝试获取列:我尝试@item().@value但收到错误"位置"xx"的字符串字符'@'不是预期的"。

有没有办法转义列名称中的 @?或者我可以重命名列?

谢谢

编辑: 下面是来自 ADF 管道的 JSON:

{
"name": "pipeline3",
"properties": {
"activities": [
{
"name": "Lookup1",
"type": "Lookup",
"policy": {
"timeout": "7.00:00:00",
"retry": 0,
"retryIntervalInSeconds": 30,
"secureOutput": false,
"secureInput": false
},
"typeProperties": {
"source": {
"type": "HttpSource",
"httpRequestTimeout": "00:01:40"
},
"dataset": {
"referenceName": "HttpFile1",
"type": "DatasetReference"
},
"firstRowOnly": false
}
},
{
"name": "ForEach2",
"type": "ForEach",
"dependsOn": [
{
"activity": "Lookup1",
"dependencyConditions": [
"Succeeded"
]
}
],
"typeProperties": {
"items": {
"value": "@activity('Lookup1').output.value",
"type": "Expression"
},
"activities": [
{
"name": "Stored Procedure12",
"type": "SqlServerStoredProcedure",
"policy": {
"timeout": "7.00:00:00",
"retry": 0,
"retryIntervalInSeconds": 30,
"secureOutput": false,
"secureInput": false
},
"typeProperties": {
"storedProcedureName": "[dbo].[testnv]",
"storedProcedureParameters": {
"d": {
"value": {
"value": "@item().@accno",
"type": "Expression"
},
"type": "String"
}
}
},
"linkedServiceName": {
"referenceName": "AzureSqlDatabase1",
"type": "LinkedServiceReference"
}
}
]
}
}
]
},
"type": "Microsoft.DataFactory/factories/pipelines"

}

请尝试"@item((['@accno']"来表示@item((.@accno 也在MSDN中回复。

相关内容

  • 没有找到相关文章

最新更新