Azure data factory 列名称中带有@的Azure数据工厂数据集
我有一个来自Rest Web服务的数据集,列名中有一个@: 比如:Azure data factory 列名称中带有@的Azure数据工厂数据集,azure-data-factory,Azure Data Factory,我有一个来自Rest Web服务的数据集,列名中有一个@: 比如: { 资料[{ @id:1, @价值:“a” }, { @id:2, @值:“b” } ] } 我想在foreach中使用它并访问特定列: 在foreach中,我得到的输出类似于@activity('Lookup').output.value 在foreach中有一个存储过程 作为参数输入,我尝试获取列:我尝试了@item()。@value,但得到错误“位置'xx'处的字符串'@'不应出现” 有没有办法转义列名中的@?或者我可以重
{
资料[{
@id:1,
@价值:“a”
}, {
@id:2,
@值:“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()尝试“@item()['@accno']”。@accno
也已在MSDN中回复。请为@item()。@accno尝试“@item()['@accno']”
也用MSDN回复。您为每个人使用的语言是什么?你在说什么存储过程?我添加了adf json。我使用adf表达式语言,storedprocedure只是一个接受一个参数的虚拟过程。您为每个人使用什么语言?你在说什么存储过程?我添加了adf json。我使用adf表达式语言,storedprocedure只是一个接受一个参数的虚拟过程。