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: 

Delete Managed Table from S3 Bucket

berk
New Contributor II

Hello,

I am encountering an issue with our managed tables in Databricks. The tables are stored in S3 Bucket. When I drop a managed table (either through UI or through running a drop table code in a notebook), the associated data is not being deleted from the S3 bucket, as I would expect from a managed table. But the table is removed from the catalog section in Databricks.

Has anyone else experienced something similar?

Best,

2 REPLIES 2

kenkoshaw
New Contributor II

The S3 bucket data is deleted within 30 days according to their documentation here.

However it would be good if there was a way to force this process.
As this isn't sufficient for a case I have where i want to delete a catalog, all it's tables and it's linked external location as If I delete the external location the managed s3 deletion won't happen and the s3 data will be there forever.

So now I have failing terraform pipelines that can't delete this external location (due to having managed table data linked), and if i delete it manually with admin rights the s3 data will remain.

 

berk
New Contributor II

@kenkoshaw, thank you for your reply. It is indeed interesting that the data isn't immediately deleted after the table is dropped, and that there's no way to force this process. I suppose I'll have to manually delete the files from the S3 Bucket if I want them gone immediately.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group