0

I have a schema specific for temporary tables in redshift. Eventually, as creation of a lot of tables takes a lot of space, I would like to know the following:

  • Is there a way to automate deletion of tables in that schema after X days(lets say 30 days) after the table's creation date?
  • Any articles on the above question I can refer to?

Thanks.

a_horse_with_no_name
  • 497,550
  • 91
  • 775
  • 843
MrKrizzer
  • 369
  • 1
  • 4
  • 15

1 Answers1

0

You could start on Is there any way to find table creation date in redshift? You can first collect the output to a temporary table and then run something that DROPs tables that have age over your threshold or you can do it in one step.

Vesa Karjalainen
  • 1,007
  • 9
  • 15