簡體   English   中英

Azure ADF @replace表達式如何轉義\\字符

[英]Azure ADF @replace expression how to escape the \ character

由於某些原因,Azure ADF表達式無法解析此內容。

這是用於設置名為“ out”的字符串變量的變量活動的表達式。 @replace('whats\\up\u0026#39;,'\\','/')

錯誤是: Invalid Position 25 Syntax error: Missing comma between arguments實際指向/字符的Invalid Position 25 Syntax error: Missing comma between arguments

@'\\'&/ @'/'沒什么區別。 '\\\\','/',...的任何組合也不起作用。

實際上,為我的值what\\up\u003c/code>分配了一個名為“ in”的變量。 因此,真正的表達式是: @replace(variables('in'),'\\','/')產生相同的錯誤,但Position 30

我發現沒有什么東西可以解釋ADF中的表達式引擎/編譯/執行。

抱歉,屏幕快照糟糕。 但是氣泡不能截屏 在此處輸入圖片說明 在此處輸入圖片說明

在此處輸入圖片描述@replace('whats \\ 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"
        }
    }
}

} 在此處輸入圖片說明

在此處輸入圖片說明

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM