I created a pipeline and a trigger, and I'm trying to get the trigger to be auto-started right after deployment. I saw in documentation that after deployment the trigger's state is "stopped" and I want to ask how can I change that in my template deployment in order to not be needed to use powershell script right after every deployment.
I tried to use the "runtimeState" parameter in my TD but it was replaced to "stopped".
This is my trigger:
{
"name": "[concat(variables('factoryName'), '/periodicTrigger')]",
"type": "Microsoft.DataFactory/factories/triggers",
"apiVersion": "2018-06-01",
"properties": {
"description": "Periodic trigger for the backup pipeline.",
"annotations": [],
"runtimeState": "Started",
"pipelines": [
{
"pipelineReference": {
"referenceName": "[concat(variables('mainStorageName'),'backupPipeline')]",
"type": "PipelineReference"
},
"parameters": {}
}
],
"type": "ScheduleTrigger",
"typeProperties": {
"recurrence": {
"frequency": "Day",
"interval": 1,
"startTime": "2018-08-21T13:28:07.785Z",
"timeZone": "UTC",
"schedule": {
"minutes": [
0
],
"hours": [
3
]
}
}
}
},
"dependsOn": [
"[concat(variables('factoryId'), '/pipelines/',concat(variables('mainStorageName'),'backupPipeline'))]"
]
},
Azure Data Factory Triggers come in three different types: Schedule Trigger, Tumbling Window Trigger, and Event-based Trigger.
The trigger used has a 5-minute recurrence interval. So, in this scenario both types of triggers behave in the same way. But tumbling window triggers have a self-dependency property which is not available with Schedule triggers.
Trigger the pipeline manually Select Trigger on the toolbar, and then select Trigger Now. On the Pipeline Run page, select OK. Go to the Monitor tab on the left. You see a pipeline run that is triggered by a manual trigger.
It's not supported yet, https://github.com/MicrosoftDocs/feedback/issues/1583
" After investigating the issue, unfortunately there is no way to create an activated trigger. ARM templates only support PUT actions, but start is a separate POST action. To activate a trigger, you must explicitly call the start API either via UX, Powershell or whatever ADF SDK you are using after creation. This is due to runtime state being a readonly property that a user cannot explicitly set. "
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With