cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 

Orphaned __dlt_materialization schemas left behind after dropping materialized views

sgreenuk
New Contributor

Hi everyone,

I’m seeing several internal schemas under the __databricks_internal catalog that were auto-created when I built a few materialized views in Databricks SQL. However, after dropping the materialized views, the schemas were not automatically deleted and they are still showing even though they have no table or view assocaited. I also cannot delete these as it says "System owned schema can't be deleted". 

Has anyone else seen these internal __dlt_materialization_schema_* entries remain after dropping materialized views? Do they eventually get cleaned up automatically, or does Databricks Support need to remove them manually from the metastore?

Thanks.

1 REPLY 1

nayan_wylde
Honored Contributor III

Yes, this is expected behavior in Databricks. The __databricks_internal catalog contains system-owned schemas that support features like materialized views and Delta Live Tables (DLT). When you create materialized views, Databricks generates internal schemas such as __dlt_materialization_schema_* for query caching and dependency tracking.

These schemas typically persist even if empty. Databricks does not guarantee automatic cleanup on a fixed schedule. They may eventually be removed during internal housekeeping, but this is not immediate or user-controllable.

If you need them removed (e.g., for compliance or to keep the metastore clean), you’ll need to open a Databricks Support ticket. Only Databricks can purge these entries from the metastore.

 

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now