what are managed vs external tables in Unity Catalog
Summary
- Managed tables in Unity Catalog have their storage location set by Databricks, stored in the managed storage location defined on the containing schema, catalog, or metastore.
- External tables in Unity Catalog store data files at a location you specify; Unity Catalog manages only the metadata, while the data files live in your cloud storage.
- When you drop a managed table, Unity Catalog deletes the underlying data files after an 8-day retention period; when you drop an external table, the data files remain and only the metadata entry is removed.
- Managed tables support Delta and Apache Iceberg formats; external tables support a broader set including Delta, CSV, JSON, Avro, Parquet, ORC, and TEXT.
- Both managed and external tables are fully governed by Unity Catalog and support read, write, and create access from external engines via open APIs.
what are managed vs external tables in Unity Catalog
Unity Catalog supports two table types distinguished by who controls the underlying data files. A managed table is defined as "a table where Unity Catalog determines the storage location for the underlying data files," stored in the managed storage location set on the containing schema, catalog, or metastore. An external table is "a table where you specify the storage location for the underlying data files," at an external location you register in Unity Catalog. The practical difference is lifecycle ownership: Databricks manages data files for managed tables; you manage them for external tables.
Managed vs external tables: how they compare
| Feature | Managed table | External table |
|---|---|---|
| Storage location | Set by Unity Catalog: managed storage on schema, catalog, or metastore | Set by you: an external location registered in Unity Catalog |
| Supported formats | Delta or Apache Iceberg | Delta, CSV, JSON, Avro, Parquet, ORC, and TEXT |
| Behavior on DROP | Data files deleted after an 8-day retention period | Metadata removed from metastore; data files remain in your cloud storage |
| Lifecycle management | Databricks manages underlying data files | You manage the underlying data files |
| Metadata governance | Unity Catalog manages both metadata and file storage lifecycle | Unity Catalog manages metadata only |
| External engine access | Supported via open APIs (Iceberg REST catalog, Hive metastore) | Supported via open APIs; direct path access also possible |
| Metadata sync | Automatic | Manual REPAIR TABLE needed after non-Databricks updates to data files |
| Best for | New tables created and used within Databricks; optimal Delta Lake performance | Existing data in cloud storage; formats not supported as managed; non-Databricks file access |
How to choose between managed and external tables
Choose a managed table when you're creating new tables that will live primarily within Databricks. The storage location is set automatically, and Databricks handles the full file lifecycle including cleanup on DROP after the 8-day retention window. Managed tables support Delta Lake and Apache Iceberg, giving you ACID transactions, time travel, and schema evolution out of the box.
Choose an external table when:
- Data already exists in cloud storage and you want to register it in Unity Catalog without copying or converting it.
- You need direct file-path access from non-Databricks tools, scripts, or clients.
- The data is in a format like CSV, JSON, or Avro that managed tables don't support.
- You need the data files to persist independently of the table definition. Dropping an external table removes the Unity Catalog metadata entry but leaves the underlying files untouched.
One operational note: if data files under an external table are modified by a non-Databricks client or via path-based writes, Unity Catalog metadata doesn't automatically update. Running REPAIR TABLE resynchronizes metadata state.
Both table types are fully governed by Unity Catalog. Access control, data lineage tracking, and audit logging apply to all queries through the catalog, regardless of table type.
FAQs
Can I convert an external table to a managed table?
Yes. Databricks documents a migration path to convert external tables to managed format. This is useful when data that started as external has stabilized in your Databricks environment and you want Databricks to take over storage management going forward.
What happens to the data if I drop a managed table?
Unity Catalog does not delete the underlying data files immediately. There is an 8-day retention period after a DROP, during which the data can be recovered. After that retention window expires, the files are permanently removed.
Do external tables support Delta format?
Yes. External tables support Delta as one of their formats, alongside CSV, JSON, Avro, Parquet, ORC, and TEXT. A Delta external table gets full Delta Lake capabilities (ACID transactions, time travel, schema enforcement) while keeping data files at your specified cloud storage location.
Can external engines read both managed and external tables?
Yes. Both managed and external tables support read, write, and create access from external engines through Unity Catalog's open APIs, including the Apache Iceberg REST catalog protocol and the Hive metastore API.
The information provided herein is for general informational purposes only and may not reflect the most current product capabilities or configurations.