ADF V2错误不应在位置上使用字符串字符'@' [英] ADF V2 Error the string character '@' at position is not expected
本文介绍了ADF V2错误不应在位置上使用字符串字符'@'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是MSDN的双重帖子,但没有得到任何帮助,所以我希望一些专家在这里看到它.
This is a double post with MSDN, but didn't get any help there so i'm hoping some expert sees it here.
我从找到的示例开始https://docs.microsoft.com/zh-CN/azure/data-factory/tutorial-incremental-copy-powershell
"name": "SinkDataset",
"properties": {
"type": "AzureBlob",
"typeProperties": {
"folderPath": "adftutorial/incrementalcopy",
"fileName": "@CONCAT('Incremental-', pipeline().RunId, '.txt')",
"format": {
"type": "TextFormat"
}
},
我的代码变成了
"typeProperties": {
"fileName": "S1073_PBI_DAY_JUSTIF_VW.csv",
"folderPath": "@CONCAT('bict2233/data-in/day/', @{dataset().TriggerRunTime})",
"format": {
"type": "TextFormat",
....
但是我遇到了这个错误
Invoke-AzureRmDataFactoryV2Pipeline : HTTP Status Code: BadRequest
Error Code: BadRequest
Error Message: The template validation failed: 'the string character '@' at position '32' is not expected..'.
Request Id: 55664c55-8a20-403b-9fbf-a4c24166b473
Timestamp (Utc):12/14/2017 15:37:59
At C:\ADF\bict2233_A\Powershell\T.ps1:25 char:10
+ $runId = Invoke-AzureRmDataFactoryV2Pipeline -PipelineName "lstgDayJu ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Invoke-AzureRmDataFactoryV2Pipeline], ErrorResponseExceptio
知道为什么吗?
Thx
推荐答案
我确实发现了问题.
"folderPath": "@concat('bict2233/data-in/day/', formatDateTime(dataset().TriggerRunTime,'yyyyMMddHH'))"
应使用
"folderPath": {
"value": "@concat('bict2233/data-in/day/', formatDateTime(dataset().TriggerRunTime,'yyyyMMddHH'))",
"type": "Expression"
}
这篇关于ADF V2错误不应在位置上使用字符串字符'@'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文