0 votes
1 view
in Azure by (17.6k points)

This is a double post with MSDN but didn't get any help there so I'm hoping some expert sees it here.

I started from the example found at https://docs.microsoft.com/en-us/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"

            }

        },

My code became

"typeProperties": {

            "fileName": "S1073_PBI_DAY_JUSTIF_VW.csv",

            "folderPath": "@CONCAT('bict2233/data-in/day/', @{dataset().TriggerRunTime})",

            "format": {

                "type": "TextFormat",

.... 

But I'm getting this error

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], ErrorResponseException

 Any idea why?

1 Answer

0 votes
by (47.2k points)
  • Here in the problem in your code

"folderPath": "@concat('bict2233/data-in/day/', formatDateTime(dataset().TriggerRunTime,'yyyyMMddHH'))"

 

  • It must be re-written in this way:

"folderPath": {

"value": "@concat('bict2233/data-in/day/', formatDateTime(dataset().TriggerRunTime,'yyyyMMddHH'))",

"type": "Expression"

}

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...