Feature request: auto delete collection

I have a use case where I need to delete the collection I used after use.
Is there a way to set an expiration time for a collection so it will be deleted each time? I don’t need the data after doing some queries over it, and my code might hit an exception so i’d love for this to be handled by weaviate so I don’t have orphaned collections I didn’t delete.

hi @Agam_More !!

Welcome to our community :hugs:

We do not have this feature, and this is not in our roadmap.

I believe that it would be best to handle that action to an external task than leveraging to the database itself :thinking:

If there is a place in your code you know the collection can be deleted already, you can call an async task to drop the collection.

What kind of exceptions have you faced?

Adding something like pg_cron would allow this and more things.
Detaching it from the DB puts data lifecycle demands on the application layer, which seems not directly tied.

My problem is if I get an exception that is unhandled, it might not reach the deletion portion of the code.