Showing results for 
Search instead for 
Did you mean: 
Community Discussions
Connect with fellow community members to discuss general topics related to the Databricks platform, industry trends, and best practices. Share experiences, ask questions, and foster collaboration within the community.
Showing results for 
Search instead for 
Did you mean: 

Tracking File Arrivals in Nested Folders Using Databricks File Arrival Trigger

New Contributor
Hi Team,
I'm currently exploring a file arrival trigger with Data-bricks, but my data is organized into nested folders representing various sources. For instance:
  |-- file1
       |-- file.csv
  |-- file2
       |-- file.csv
My goal is to determine the specific location within the nested folder structure where a file, such as file.csv, has arrived, along with capturing the file name. This allows me to streamline my workflow by utilizing a single job for multiple files.
Could someone provide guidance on how to achieve this effectively within Data-bricks?
Thank you!

Community Manager
Community Manager

Hi @dhanshri

  • You can use file arrival triggers to automatically trigger a run of your Databricks job when new files arrive in your specified storage location.
  • This feature is particularly useful when data arrives on an irregular schedule, making scheduled jobs less efficient.
  • To add a file arrival trigger to your job:
  • Since your data is organized into nested folders representing various sources, you’ll need to configure the trigger to monitor these folders.
  • Here’s how you can approach it:
  • Keep in mind that a maximum of fifty jobs can be configured with a file arrival trigger in a Databricks workspace.
  • Additionally, a storage location configured for a file arrival trigger can contain only up to 10,000 files. Locations with more files cannot be monitored for new file arrivals
  • By implementing these steps, you’ll be able to efficiently track file arrivals within your nested folder structure and streamline your workflow.
  • Happy Databricks exploration! 


@Kaniz_Fatma did a LLM Bot write the above response for you? You link to a Stackoverflow post which uses Azure Data Factory, and you text contains concepts which do not apply to Databricks ("Use a lookup activity or a Get Metadata Activity to fetch the file with the name in the"). Actually, your answer seems to be lifted straight from Satckoverflow, pretty sure it's not allowed by their policies...

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!