In this post we are going to cover triggers and scheduling in Azure Data Factory: how a pipeline gets started, on a clock, on a time window, or when a file lands. These are 7 real Azure Data Factory interview questions, asked the way they come up on a real project, and the last one is a scenario where a 6 AM load depends on three upstream loads that finish at different times.
A trigger is the thing that starts a pipeline run without anyone clicking Debug or Trigger now. ADF has four kinds, and each one behaves differently when a run fails, runs late or overlaps with the next one. Interviewers ask about triggers because that is where production surprises come from: a job an hour late after the clocks change, two runs writing the same table, or a backfill nobody planned.
Part 7 of the Real Time Azure Data Factory Interview Questions and Answers series on TechBrothersIT.
- The short answer
- Question 1: A load must run every day at 6 AM Eastern. What are the trigger types in ADF, and which one fits?
- Question 2: Each hourly slice must load exactly once, and a failed hour must be retried and backfilled. Why use a tumbling window trigger instead of a schedule trigger?
- Question 3: The pipeline should start as soon as a file lands in blob storage. How does a storage event trigger work, and what are the gotchas?
- Question 4: The daily job ran an hour late after the clocks changed. How do time zones and daylight saving work in triggers?
- Question 5: Two runs of the same pipeline overlapped and corrupted the target. How do you control concurrency?
- Question 6: The business needs the last ninety days reloaded. How do you backfill with a tumbling window trigger?
- Scenario 7: The 6 AM load depends on three upstream loads that finish at different times. How do you orchestrate it?
The short answer
ADF has four triggers: schedule (wall clock, fire and forget), tumbling window (stateful windows with retry, backfill, dependencies and max concurrency), storage event and custom event (Event Grid). Set a real time zone for daily jobs, cap overlaps with pipeline concurrency, and chain loads by dependency, not by clock.
Keep that in mind. Every question below is one piece of it.
Question 1: A load must run every day at 6 AM Eastern. What are the trigger types in ADF, and which one fits?
The answer is a schedule trigger. But let's first list all four trigger types, because that is the real question.
- A schedule trigger fires on a wall clock calendar.
- A tumbling window trigger fires for fixed, back to back windows, and keeps state.
- A storage event trigger fires when a blob is created or deleted.
- A custom event trigger fires on an Event Grid custom topic.
| Trigger | Fires on | Notes |
|---|---|---|
| SCHEDULE | a wall clock calendar | fire and forget, many pipelines |
| TUMBLING WINDOW | fixed, back to back windows | keeps state, exactly one pipeline |
| STORAGE EVENT | blob created or deleted | Event Grid; ADLS Gen2 or GPv2 |
| CUSTOM EVENT | an Event Grid custom topic | you create the topic |
For every day at 6 AM Eastern, set the frequency to Day, the interval to 1, the schedule hours to 6, and the time zone to Eastern Standard Time:
{ "recurrence": {
"frequency": "Day",
"interval": 1,
"startTime": "2026-11-02T00:00:00",
"timeZone": "Eastern Standard Time",
"schedule": { "hours": [6], "minutes": [0] }
} }That time zone name covers daylight time too, so the run stays at 6 local time all year.
Now know the trade-off. A schedule trigger is fire and forget: the trigger run succeeds once the pipeline starts, even if the pipeline then fails. No retry, no backfill, no concurrency control.
One schedule trigger can start many pipelines, and one pipeline can have many triggers. I keep one trigger per business schedule.
Question 2: Each hourly slice must load exactly once, and a failed hour must be retried and backfilled. Why use a tumbling window trigger instead of a schedule trigger?
Because a tumbling window trigger tracks every window. It cuts time into fixed size, non-overlapping, contiguous windows, here one hour each, and it keeps the state of each one.
Let's picture a few hours:
- 00:00 to 01:00: succeeded
- 01:00 to 02:00: succeeded
- 02:00 to 03:00: failed, so rerun it
- 03:00 to 04:00 and 04:00 to 05:00: waiting
The trigger run waits for the pipeline run and takes its status. If the pipeline fails, that hour shows failed, and you rerun exactly that window. A schedule trigger has no idea which hour failed.
It also has a retry policy. The count defaults to zero, so set it, and the interval defaults to 30 seconds. And a start time in the past gives you backfill.
| Schedule trigger | Tumbling window trigger | |
|---|---|---|
| STATE | none | every window tracked |
| RUN STATUS | succeeds when the pipeline starts | mirrors the pipeline run |
| RETRY | none on the trigger | retryPolicy: count 0 by default, 30 s interval |
| BACKFILL | no | startTime in the past |
| PIPELINES | many | exactly one |
Pass the window start and end times into the pipeline as parameters, @trigger().outputs.windowStartTime and windowEndTime, and filter the source on them. Delete the slice before you load it, so a rerun can never double count.
A tumbling window trigger runs exactly one pipeline, and its frequency and interval can't be changed after you publish.
Question 3: The pipeline should start as soon as a file lands in blob storage. How does a storage event trigger work, and what are the gotchas?
It runs on Azure Event Grid. When a blob is created or deleted in an ADLS Gen2 or general purpose v2 account, Event Grid sends the event through an event subscription, and the trigger starts the pipeline, one run per file.
Now the gotchas, one at a time.
First, setup. The subscription must be registered with the Event Grid resource provider, and whoever creates the trigger needs rights to create event subscriptions. ADF's own identity needs no special role.
Second, the filters. You only get blob path begins with and ends with, and no other wildcards. For example, begins with /sales/blobs/incoming/ and ends with .csv, so temp files don't start a run. Keep ignore empty blobs on, because some tools create an empty file first.
Third, pass the file to the pipeline. Map the trigger body's file name and folder path to pipeline parameters, so each run loads just that one file:
{
"fileName": "@triggerBody().fileName",
"folderPath": "@triggerBody().folderPath"
}Here is the checklist for production:
- Event Grid registered: on the subscription.
- Begins with, ends with: no other wildcards.
- Ignore empty blobs: skips zero-byte files.
- Private endpoint: still let Event Grid reach the account.
- 500 triggers: per storage account.
100 files dropped means 100 pipeline runs. Use pipeline concurrency, or trigger on a single done file.
Question 4: The daily job ran an hour late after the clocks changed. How do time zones and daylight saving work in triggers?
This is almost always a trigger set in UTC. Someone converted 6 AM Eastern to 11:00 UTC in the winter. When daylight saving started, 11:00 UTC became 7 AM Eastern, so the job ran an hour late.
| Trigger setup | Winter (EST) | Summer (EDT) |
|---|---|---|
| UTC, 11:00 every day | 6 AM Eastern | 7 AM Eastern: an hour late |
| Eastern Standard Time, daily at 6 | 6 AM | 6 AM |
| Eastern, every 24 hours | 6 AM | shifts by an hour |
The fix is to set the trigger's time zone to Eastern Standard Time, with a daily recurrence at 6. ADF then adjusts for daylight saving for you.
But only for recurrences of days or longer. With an hour or minute recurrence, the trigger keeps firing at fixed intervals, so an every 24 hours trigger still drifts. Use a Day frequency for wall clock jobs.
One syntax rule: for UTC, the start and end times must end with the letter Z, or the trigger fails to activate.
{
"startTime": "2026-11-02T11:00:00Z",
"timeZone": "UTC"
}For any other time zone, leave the Z off:
{
"startTime": "2026-11-02T06:00:00",
"timeZone": "Eastern Standard Time"
}The API and PowerShell run filters use UTC, while the monitor screen shows your browser's local time by default. Check which one you're reading.
Question 5: Two runs of the same pipeline overlapped and corrupted the target. How do you control concurrency?
Two things went wrong here: run 1 started at 6:00 and was still running when run 2 started at 6:30 on the same target table, and the load wasn't safe to run twice. So I fix both.
First, the pipeline concurrency setting. Set it to 1, and only one run of that pipeline executes at a time. Later runs don't fail; they wait in a queue, and a pipeline can hold up to 100 queued runs.
{
"name": "pl_load_orders",
"properties": {
"concurrency": 1,
"activities": []
}
}Second, the trigger. A schedule trigger has no concurrency control, so it fires even if the last run is still going. A tumbling window trigger has max concurrency, from 1 to 50. Set it to 1.
For strict order, add a self-dependency with a negative offset, so each window waits for the previous window to succeed. Then make the load idempotent: delete the slice before you insert it, or upsert on the business key.
| Control | What it does |
|---|---|
| Pipeline concurrency: 1 | one run at a time; later runs queue (up to 100) |
| Tumbling window maxConcurrency: 1 | one window at a time (allowed 1 to 50) |
| Self-dependency, negative offset | each window waits for the previous one |
| Idempotent load | delete the slice or upsert: no duplicates |
If a run regularly takes longer than the schedule interval, the queue just keeps growing. Concurrency hides the problem, so also find out why the run got slower.
Question 6: The business needs the last ninety days reloaded. How do you backfill with a tumbling window trigger?
Create a tumbling window trigger with a start time in the past. Here we want daily windows, which you write as frequency Hour and interval 24, starting ninety days ago, with an end time of today. Frequency can be Minute, Hour or Month.
{
"type": "TumblingWindowTrigger",
"typeProperties": {
"frequency": "Hour",
"interval": 24,
"startTime": "2026-07-23T00:00:00Z",
"endTime": "2026-10-21T00:00:00Z",
"maxConcurrency": 5,
"retryPolicy": { "count": 2, "intervalInSeconds": 300 }
}
}Let's walk through what happens next.
- 90 daily windows: when you publish and start it, ADF creates one window for every day since the start time.
- Oldest to newest: it runs them in that order, and you can't change it.
- 5 at a time: max concurrency decides how many windows run at once. I'd use 5, not 50, so the backfill doesn't hammer the source system. Add a retry policy too, so one network blip doesn't leave a hole.
- One window, one slice: the pipeline takes the window start and end times as parameters and loads only that day. Each slice deletes its old rows before it loads.
- Rerun failed days: in monitoring, each day has its own status. If three days fail, you rerun only those three windows.
These are the two values the pipeline reads:
@trigger().outputs.windowStartTime
@trigger().outputs.windowEndTimeA rerun uses the latest published trigger definition, so fix the pipeline, publish, then rerun.
Scenario 7: The 6 AM load depends on three upstream loads that finish at different times. How do you orchestrate it?
Let's say the three upstream loads are Finance, Sales and Inventory, and the 6 AM load must run only when all three succeed. I have three designs, in order of preference.
- Parent pipeline. My first choice. One trigger starts it. Three Execute Pipeline activities run the upstream loads in parallel, with wait on completion turned on, and the 6 AM load runs only when all three succeed.
- Tumbling window dependencies. If each upstream load has its own tumbling window trigger, the final trigger depends on all three. Up to 5 upstream triggers are allowed, and its window shows Waiting on dependency until they succeed.
- Done files. If an upstream load lives outside ADF, have it drop a done file. Then a storage event trigger, or a Validation activity with a timeout, waits for that file.
Then plan for the late day. Put a timeout on every wait, add a failure path that alerts the team, and tell the business before the report is wrong, not after.
Don't chain loads by clock time. Chain them by dependency, so a late upstream delays the load instead of loading half the data.
Key points to remember
- Schedule for wall-clock jobs; fire and forget
- Tumbling window: state, retry, backfill, dependencies
- Storage events: Event Grid, begins and ends with filters
- Daily jobs in a real time zone; UTC needs the Z
- Pipeline concurrency, idempotent loads, chain by dependency
Part 8: Mapping Data Flows
Part of the Real Time Azure Data Factory Interview Questions and Answers series on TechBrothersIT. Features, limits and their status (GA or preview) are current as of October 2026; check the Microsoft Learn page for anything you quote in an interview.



No comments:
Post a Comment
Note: Only a member of this blog may post a comment.