Is there a way to drop all databases in AWS athena?

2.7k Views Asked by At

There's a bunch of test databases that I have and I'd like a way to drop all of them. They all have long random strings as names, so it kind of sucks to have to go through each one and delete, especially since you can't copy/paste.

3

There are 3 best solutions below

3
RaGe On
SHOW SCHEMAS;

Will list all databases. See: SHOW DATABASES - Amazon Athena

0
bagi On
DROP DATABASE mydatabase CASCADE;
0
The Non-binary Tree On

In Athena homepage, navigate to the menu on the left. Go to 'Data sources' tab. Click on the name of the Data source that contains the database you want to delete. Click on the name of the database you want to delete. Click 'Delete' button on the upper right direction. Follow the prompt.