Hello! Welcome back to our module on orchestrating production workflows.
In our last lesson, you learned how to run jobs on a fixed schedule, which is perfect for predictable, time-based tasks like daily reporting. You now understand how to define the what, how, and when for a classic batch pipeline.
However, modern data pipelines often need to be more responsive. Instead of waiting for a scheduled time, what if you could process data the moment it arrives? This lesson addresses that very scenario. We will explore event-driven automation by learning how to configure a file arrival trigger to run a Databricks job when new data lands. This is a powerful technique for building efficient, low-latency ELT processes.
By the end of this lesson, you will be able to automate your jobs to react to new data in real-time.
From Schedules to Events: A More Responsive Approach
While scheduled triggers are the workhorse of many data pipelines, they have a built-in inefficiency: you're either running the job too early (when no new data is present) or too late (long after the data has arrived). File arrival triggers solve this problem by shifting from a time-based to an event-based model. The "event" is a new file landing in your cloud storage.
This approach ensures that your compute resources are used only when there is new work to be done, making your pipelines more efficient and responsive.
Let's start by understanding the core concepts, prerequisites, and limitations of this trigger type from the official Databricks documentation.
Trigger jobs when new files arrive
This documentation page explains how file arrival triggers work, what you need to use them, and their important limitations. Understanding these details is crucial for both the certification exam and for building reliable pipelines.
Please read the following sections from the documentation: 'How do file arrival triggers work?': Focus on how it recursively monitors directories and the performance benefits of 'file events'. 'Before you begin': Note the key requirements, especially the need for a Unity Catalog enabled workspace and a Unity Catalog volume or external location. 'Limitations': This is a very important section. Pay close attention to the fact that triggers work on new files (not overwrites) and the different file count limits depending on whether 'file events' are enabled.
Key Concepts to Remember
From the reading, here are the essential points:
- Location: File arrival triggers monitor a Unity Catalog volume or a Unity Catalog external location. They cannot be used with arbitrary DBFS paths.
- Permissions: You need
READpermission on the storage location andCAN MANAGEpermission on the job itself. - Recursive Monitoring: The trigger watches the specified directory and all its subdirectories for new files.
- New Files Only: A trigger fires when a new file is created. Modifying or overwriting an existing file will not trigger a job run. This is a critical distinction.
Configuring a File Arrival Trigger
Now that you understand the "what" and "why," let's see the "how." The process of adding a file arrival trigger is done in the same Schedules & Triggers panel you used in the previous lesson.
Let's watch a video that demonstrates the entire process, from configuration to a live test.
Explained on how to create Jobs & Different Types of Tasks in in Databricks Workflow
This video provides a clear, concise walkthrough of setting up and testing a file arrival trigger.
Watch the segment from 12:58 to 15:12. The presenter will: Show the trigger options in the UI and select 'File arrival'. Specify the path to a Unity Catalog Volume to monitor. Demonstrate the trigger by uploading a file to the volume and showing the job start automatically.
As you saw in the video, the configuration is straightforward. You select the trigger type and provide the path to the storage location you want to monitor.

Once the trigger is active, Databricks checks the location approximately every minute for new files. When a new file is detected, the job run is initiated. You can verify this in the Runs tab, where the trigger reason will be listed as "File arrival."

Your Turn: Hands-On Practice
It's time to put theory into practice. You will now modify your My Practice Workflow job to run whenever a file is uploaded to a Unity Catalog Volume.
Prerequisites:
- You have a Unity Catalog Metastore attached to your workspace.
- You have the necessary permissions to create catalogs, schemas, and volumes.
- You have the
My Practice Workflowjob from our previous lessons.
Part 1: Set Up a Landing Zone (UC Volume)
First, we need a location to upload files to. A Unity Catalog Volume is perfect for this.
- Navigate to the Catalog Explorer in your Databricks workspace.
- Select a catalog and schema you can write to (or create new ones). For example, you can run this in a notebook to ensure they exist:
CREATE CATALOG IF NOT EXISTS main; USE CATALOG main; CREATE SCHEMA IF NOT EXISTS hands_on; USE SCHEMA hands_on; - Create a new volume that will act as your file landing zone. You can do this using the UI (Create > Create volume) or by running the following SQL command in a notebook:
This creates a volume at the pathCREATE VOLUME IF NOT EXISTS file_arrival_landing_zone;/Volumes/main/hands_on/file_arrival_landing_zone. This is the path your trigger will monitor.
Part 2: Configure the File Arrival Trigger
Now, let's configure your existing job to use this trigger.
- Navigate to your
My Practice Workflowjob in the Workflows UI. - In the Job details panel on the right, find the Schedules & Triggers section. If you still have the paused schedule from the last lesson, click Edit trigger. Otherwise, click Add trigger.
- Set the Trigger type to File arrival.
- In the Storage location box, enter the full path to the volume you just created:
/Volumes/main/hands_on/file_arrival_landing_zone. - Click Save. The trigger should now be listed as "Active".
Part 3: Test the Trigger
The final step is to test it!
- Go back to the Catalog Explorer.
- Navigate to your
file_arrival_landing_zonevolume. - In the top right, click Upload to this volume and upload any small file from your computer (a simple
.txtor.csvfile is fine). - Quickly navigate back to your job in the Workflows UI and open the Runs tab.
- Within about a minute, you should see a new job run appear with the status "Pending" or "Running". The "Trigger" column will indicate it was started by File arrival.
Congratulations! You have successfully configured an event-driven workflow. Once you've seen it run, you can Pause the trigger to prevent further runs.
Conclusion
In this lesson, you've moved beyond fixed schedules and embraced event-driven orchestration. You now know how to build more efficient and responsive pipelines that process data as soon as it becomes available.
Key Takeaways
- File arrival triggers enable event-driven workflows, launching jobs in response to new data.
- They monitor a specified Unity Catalog volume or external location and its subdirectories.
- Configuration is done in the Workflows UI by setting the trigger type to "File arrival" and providing the storage path.
- Crucially, triggers only fire for newly created files, not for files that are overwritten or modified.
- You can verify a successful trigger by checking the Runs tab for a job "Launched By file arrival".
Next Steps
You've now learned how to create jobs, define dependencies, and trigger them based on time or file events. But what happens when things go wrong? How do you diagnose a failed task or inspect the output of a successful one? In our next lesson, we will focus on the operational side of workflows as you learn to monitor job runs and view task logs and outputs in the Workflows UI.