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

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.



Solution 1:[1]

SHOW SCHEMAS;

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

Solution 2:[2]

DROP DATABASE mydatabase CASCADE;

Solution 3:[3]

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.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 John Rotenstein
Solution 2 bagi
Solution 3 The Non-binary Tree