- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
The confusion here usually stems from overlapping two different architectural concepts: the "Landing Zone" (where raw data arrives) and "Managed Storage" (where Databricks governs the data lifecycle).
To address your questions directly:
1. Does Databricks configure S3 Event Notifications for the entire prefix, including __unitystorage? Yes. When you enable File Events on an External Location at the cloud level, AWS S3 simply configures EventBridge/SQS for that entire prefix. Because __unitystorage sits under that prefix, S3 will technically generate cloud events for files added to Managed Volumes/Tables within that path.
2. Can Auto Loader use Managed File Events to ingest from a Managed Volume? While technically events might be firing in the cloud, using Managed File Events to ingest from a Managed Volume is an anti-pattern and is not the intended use case. Managed File Events are officially designed to ingest data from External Locations/External Volumes. By definition, Databricks governs the lifecycle of Managed Volumes. External systems (like your AWS Kinesis firehose, SFTP drops, or third-party apps) should never be dropping raw files directly into the obscure __unitystorage path. Therefore, Auto Loader shouldn't need to listen for external file arrival events in a Managed Volume.
3. What is the purpose of enabling File Events on an External Location used for Managed Storage? Ideally, you shouldn't be doing this. It is a best practice to strictly separate your storage buckets (or at least your top-level prefixes):
Landing/Raw Bucket: Configured as an External Location with File Events enabled. External systems drop data here.
Managed Bucket: Configured as the root storage for your Unity Catalog/Schemas. File Events do not need to be enabled here because Databricks orchestrates all data movement into this location.
4. Is your recommended architecture correct? Yes, your assumption at the end is 100% correct. The best-practice design pattern is:
Ingestion: External Volume (pointing to your landing bucket) + Managed File Events -> Auto Loader -> Target Delta Table.
Internal Storage: Managed Volumes/Tables are used for internal Databricks processing, intermediate steps, or saving ML artifacts. If you ever do need to read from a Managed Volume with Auto Loader, Directory Listing is the appropriate method, as the volume of files should be entirely controlled by internal Databricks processes.