Azure ADF @replace 表达式如何转义 \ 字符
Azure ADF @replace expression how to escape the \ character
Azure ADF 表达式由于某种原因无法解析。
这是用于设置名为 "out" 的字符串变量的变量 activity 的表达式。
@replace('whats\up','\','/')
错误是:
Invalid Position 25 Syntax error: Missing comma between arguments
实际上指向 /
字符
@'\' &/ @'/' 没有区别。
'\\', '/', ....
的任何组合也不行
实际上我的值 what\up
被分配了一个名为 'in' 的变量。
所以真正的表达是:@replace(variables('in'),'\','/')
它产生相同的错误,但 Position 30
我找不到任何东西可以解释 ADF 中的表达式 engine/compilation/execution。
对不起,糟糕的屏幕摄像头。但是气泡不截屏
在此处输入图片描述@replace('whats\up, '\', '/') 你在 up 之后漏掉了一个单引号 '。
{
"name": "pipeline14",[![enter image description here][1]][1]
"properties": {
"activities": [
{
"name": "Set Variable1",
"type": "SetVariable",
"typeProperties": {
"variableName": "a",
"value": "@replace('whats\up','\','/')"
}
}
],
"variables": {
"a": {
"type": "String"
}
}
}
}
Azure ADF 表达式由于某种原因无法解析。
这是用于设置名为 "out" 的字符串变量的变量 activity 的表达式。
@replace('whats\up','\','/')
错误是:
Invalid Position 25 Syntax error: Missing comma between arguments
实际上指向 /
字符
@'\' &/ @'/' 没有区别。 '\\', '/', ....
的任何组合也不行实际上我的值 what\up
被分配了一个名为 'in' 的变量。
所以真正的表达是:@replace(variables('in'),'\','/')
它产生相同的错误,但 Position 30
我找不到任何东西可以解释 ADF 中的表达式 engine/compilation/execution。
对不起,糟糕的屏幕摄像头。但是气泡不截屏
在此处输入图片描述@replace('whats\up, '\', '/') 你在 up 之后漏掉了一个单引号 '。
{
"name": "pipeline14",[![enter image description here][1]][1]
"properties": {
"activities": [
{
"name": "Set Variable1",
"type": "SetVariable",
"typeProperties": {
"variableName": "a",
"value": "@replace('whats\up','\','/')"
}
}
],
"variables": {
"a": {
"type": "String"
}
}
}
}