The technique you have been using to run pipelines up to now has been to click either the Debug button or the Trigger Now item from the Add Trigger menu. Figure 6.31 shows both options.
FIGURE 6.31 Running an Azure Synapse Analytics pipeline
Each approach, Debug or Trigger Now, requires manual intervention, which is all right for testing and for performing the occasional unique pipeline activity. However, you know that doing work manually over and over again is not optimal and that any work that can be automated should be. So instead of manually triggering your batch process or pipeline execution, you can schedule it. The alternative to Trigger Now, as shown in Figure 6.31 is New/Edit. The experience when the New/Edit menu item is selected is the same for both Azure Synapse Analytics and Azure Data Factory. The following section describes that experience in detail.
Azure Synapse Analytics and Azure Data Factory
When you select New/Edit from the Add Trigger menu, an Add Triggers pop‐out window that lists the existing triggers opens. Click the drop‐down text box under the Add Triggers and select + New option. Figure 6.32 represents the window that is rendered.
The Start Date field is intuitive, in that the value is when you want the pipeline to be triggered. That value is usually in the future and is the first time it will run when the Start Trigger on Creation check box is selected. Notice also that you can select the time zone in which you want to run trigger the pipeline. If you are running a global Big Data program that has pieces scattered out in different countries, then it might be a good idea to choose UTC. This way you can avoid needing to calculate what time it is in the CST time zone when you are running the pipeline that is located in the CET time zone. Instead, you can always think in terms of UTC, which is a universal time, and use it for all your scheduling. However, if you are working within a single time zone, then it might be a good idea to use your local time zone, to keep things simpler.
FIGURE 6.32 Azure Synapse Analytics New/Edit trigger
The Specify an End Date check box gives you the opportunity to define when the job will stop being triggered. The Recurrence option is how often or the frequency in which you want the pipeline to be triggered. The options are Minute(s), Hour(s), Day(s), Week(s), or Month(s). If you enter 4 in the Every text box and choose Hour(s) from the drop‐down text box, then the trigger will run every 4 hours, or 6 times per day. It will run from the time you selected in the Start Date text box. The last option you need to select before committing the new trigger is the type of trigger you need. Table 6.4 summarizes the options.
TABLE 6.4 Types of pipeline triggers
Type | Relationship | Description |
Scheduled | Many‐to‐many | Specify a start date, recurrence, and an end date. |
Tumbling window | One‐to‐one | Like a scheduled trigger but with retry, concurrency, and other additional capabilities. |
Storage event | One‐to‐one | Triggered when a file that resides on an Azure Storage container is created or deleted. |
Custom event | One‐to‐one | Azure Event Grid triggers the pipeline on a received event. |
Each of these trigger types has some uniqueness, but they are varied enough to provide all the features you need for any requirement. More details about each trigger type are provided in the following subsections.