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:ย 

Can I use SQL to create a table and set an expiration date?

whleeman
New Contributor III

Can I use SQL to create a table and set and expiration date? So that the table will be deleted automatically after the expiration date.

1 ACCEPTED SOLUTION

Accepted Solutions

mkm
New Contributor III

Not that I am aware of but you could create a job with a notebook task that runs a drop table <tablename> statement then set it to run on a trigger in the job when you want it to be deleted. 

View solution in original post

2 REPLIES 2

mkm
New Contributor III

Not that I am aware of but you could create a job with a notebook task that runs a drop table <tablename> statement then set it to run on a trigger in the job when you want it to be deleted. 

prakash1
New Contributor II

Right now it i not possible. You can always create a custom trigger solution with parameter to call notebook and delete the table.

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