Azure-Player / azure.datafactory.devops

Azure DevOps Deployment Tasks for Azure Data Factory objects
MIT License
39 stars 21 forks source link

tumbling window trigger with current date and time. #45

Closed himmyaggarwal closed 3 years ago

himmyaggarwal commented 3 years ago

Hi Team,

I have set up SQLPlayer for our deployments. But facing challenge with our requirement.

We have few tumbling window triggers those are supposed to be updated with current date and time at the time of each deployment.

How can we do that with SQLPlayer adftool?

I have updated config file: trigger,Tumbling_window_trigger,properties.typeProperties.startTime,"$($Env:time)"

and passing value which is current date and time through environment variable.

SudhirNune commented 3 years ago

We are seeing the same issue with the Tumbling window deployment

we tried following options and did not work

trigger,Tumbling_window_trigger,properties.typeProperties.startTime,"$($Env:time)" trigger,Tumbling_window_trigger,properties.typeProperties.startTime,"$Env:time" trigger,Tumbling_window_trigger,properties.typeProperties.startTime,"2021-05-05T12:00:00Z" trigger,Tumbling_window_trigger,properties.typeProperties.startTime,"$(Get-Date -UFormat ""%Y-%m-%dT%H:%m:00Z"")"

all of then resulted with same Error: **Validation of config file completed.

[error]Data Exception.**

himmyaggarwal commented 3 years ago

Hi Team,

I can see below error.

Can we update startTime of tumbling window trigger at the time of deployment?

2021-05-05T17:44:52.5765436Z ##[error]TumblingWindowTriggerStartTimeUpdateNotAllowed : Start time cannot be updated for Tumbling Window Trigger

NowinskiK commented 3 years ago

I will take a look at this as soon as I can.

SudhirNune commented 3 years ago

@NowinskiK - as on today we can not update the Start time of a Tumbling Window Directly, below steps are to be followed:

  1. Stop the trigger if its in Started state
  2. Remove the trigger
  3. Update the JSON
  4. Deploy the Trigger
  5. Start the Trigger

Can you please check if you see any other option

RickXMoore commented 3 years ago

Try using the format below. Remove the "Properties" Key as part of the string. trigger,your_trigger_name_here,typeProperties.startTime,"2021-04-30T14:00:00.000Z"

SudhirNune commented 3 years ago

Hi @RickXMoore ,

Nope, its not helping either, for Tumbling Windows Triggers, the Trigger Has to be deleted before we can update the Start Date

RickXMoore commented 3 years ago

That’s correct. You can’t modify tumbling triggers. I assumed you already knew that I was just offering how the config file should be used. I have steps in my pipeline to stop and drop any tumbling trigger being deployed.

NowinskiK commented 3 years ago

That's right. You can not modify (in Tumbling triggers):

Why are you trying to do that? What's your scenario?