cancel
Showing results for 
Search instead for 
Did you mean: 
Data Governance
Join discussions on data governance practices, compliance, and security within the Databricks Community. Exchange strategies and insights to ensure data integrity and regulatory compliance.
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to force delete an external location. Can I see what is blocking it?

fuselessmatt
Contributor

I manually added an external location based on a Terraformed S3 bucket. Now I want to Terraform the external location as well, but it complains that I have already register another external location on that bucket (my manual one).

I thought I would quickly delete it in the UI (Data -> External Location -> Delete). First it asks if I am sure I want to delete it. When I press delete this error message comes up "External Location has dependent catalogs, schemas, managed tables or external tables; use force option to delete anyway". When I press force delete it reloads that prompt, but nothing is deleted. I revoked all permissions in the tab and dropped all tables and schemas I know was associated, but it does not help. I also Terraformed a new external location for a new bucket and delete the old bucket, but still not able to delete the manual external location. The schemas and tables were in the hive_metastore catalog if that makes any difference (the tool behind the integration does not support Unity Catalog).

Is there a way that I can see what is blocking me from deleting this?

3 REPLIES 3

sniperWolf82
New Contributor III

Hi, I am tring to assign grants to databricks_schema of unity catalog by terraform and I received the following error

Error: cannot delete external location: External Location has dependent catalogs, schemas, managed tables or external tables; use force option to delete anyway Could u please help me ?

I am wondering what is the option to force to delete anyway, because in my situation I can create catalog with terraform but tables of each catalog are created thanks to a script that makes sync between unity metastore and another external metastore.

espenol
New Contributor III

I'm having the same issue. Any updates would be appreciated.

karthik_p
Esteemed Contributor

@espenol looks you have tables that are active in other catalog's which is being picked from this location. usually your metadata stores in metastore, only external table data gets stored in external location. please check and drop tables/catalog which uses your location if you want to do that please 

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!