I am trying to use tumbling window trigger. I have a copy activity and am using zendesk api endpoint to get the data. I am trying to get all the data from 10/1/23 to 10/31/23, running for once a day. I have created a trigger and have a url like this:
https://example.zendesk.com/api/v2/search.json?query=type:ticket+created_at>=@{linkedService().startDate}&created_at<=@{linkedService().endDate}
in my linked service, I have 2 parameters: startDate and endDate. the goal is to pull data between the start date and end date using the created_at column in zendesk.
In my copy activity I have 2 parameters, startdate and enddate which are: trigger().outputs.windowStartTime and trigger().outputs.windowEndTime
I am getting this error:
Failure happened on 'Source' side. ErrorCode=RestCallFailedWithClientError,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Rest call failed with client error, status code 422 422, please check your activity settings.
Request URL: https://example.zendesk.com/api/v2/search.json?query=type:ticket+created_at%3E=trigger().outputs.windowStartTime&created_at%3C=trigger().outputs.windowEndTime.
Response: {"error":"invalid","description":"Invalid search: Illegal value "trigger" for "created". Expected date as yyyy-mm-dd, ISO time such as yyyy-mm-ddThh:mm:ss+05:00, or relative time such as 2hours."},Source=Microsoft.DataTransfer.ClientLibrary,'
I believe that the issue is that the created_at column is in the following format: 2023-10-01T00:00:00Z, and windowstarttime and windowendtime are not in the same format. I have tried using the expression builder in the copy activity to convert it using formatDateTime, but have not been successful.