Azure Data Factory – How to Create Schedule Trigger

The schedule trigger runs automatically and invoke pipelines in an ADF. We can create multiple triggers to run a pipeline and create single trigger to run multiple pipeline. Let’s suppose you have already implemented an ADF pipeline, if not you can find an example here to create an ADF pipeline so you need to create a schedule trigger.

Implementation

A schedule trigger takes Name, Start Time in UTC, Recurrence, End Date if any, Activated as true or false.

To Add a Trigger, open ADF from your resource group, go to Manage > Triggers > Click New > Enter the details > OK and this will create a trigger for the ADF.

As of now, there is no pipeline is associated to trigger so this is an ideal trigger and nothing will happen. To associated this trigger to a pipeline, Go to pipeline > Trigger > New/Edit > Choose Trigger > Select MinuteTrigger.

You must need to publish trigger association of pipeline to get it deployed and run automatically. if you don’t publish then only manual trigger can be performed to the pipeline.

Trigger JSON is shown below. To view JSON, go to Manage > Triggers, mouse hover on the trigger and click code icon.

{
    "name": "MinuteTrigger",
    "properties": {
        "annotations": [],
        "runtimeState": "Started",
        "pipelines": [
            {
                "pipelineReference": {
                    "referenceName": "ADF-Pipeline",
                    "type": "PipelineReference"
                }
            }
        ],
        "type": "ScheduleTrigger",
        "typeProperties": {
            "recurrence": {
                "frequency": "Minute",
                "interval": 5,
                "startTime": "2020-06-16T03:20:00.000Z",
                "timeZone": "UTC"
            }
        }
    }
}

So trigger is now scheduled to run at every five minute interval that can be verified by navigating to Monitor > Trigger Runs

Note – The recurrence section can be parameterised by creating and using parameters for frequency and interval in ARM template

Hope, this gives an understanding about how to create schedule trigger, associate to pipeline and see the trigger runs.

If you have any suggestions/feedback, please put them in the comment box.

Happy Learning 🙂

Leave a Reply

Up ↑

%d bloggers like this: