Reputation: 1
I have a pipeline that has a Copy Data Activity which takes two inputs, startDate and endDate. When I configure a Tumbling window, the start date of the trigger is being fed as the input for startDate parameter and start date of the trigger + 1 i.e., next day is being fed as the input for endDate parameter.
But when I run the trigger, the Copy Data activity is failing since there is a date format issues. So I tried formatting the date in the Sink of the Copy Data Activity and I am getting the below error
"Operation on target CopyData1 failed: In function 'formatDateTime', the value provided for date time string 'trigger().outputs.windowStartTime' was not valid. The datetime string must match ISO 8601 format".
How do I overcome this?
Upvotes: 0
Views: 1266
Reputation: 4552
Your pipeline parameter default values are causing this issue. Your formatDateTime() function should take pipeline parameters, not trigger variable.
"Parameters": {
"windowStart": "@trigger().outputs.windowStartTime",
"windowEnd": "@trigger().outputs.windowEndTime"
}
Above system parameters will be having access to Windows Start time and Windows End time values. This is not supported. You cannot have dynamic values as your default values. Default values need to be static strings. To accomplish this, you need two parameters inside pipeline to take Windows Start time and Windows End time from the trigger, and then pass these parameters inside the formatDateTime() function.
Upvotes: 0