Created
December 22, 2020 05:48
-
-
Save mtranter/c330b7bc016f6932f9fbce56ffd3f0c1 to your computer and use it in GitHub Desktop.
Bash script to bulk delete athtena tables
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws glue get-tables --database-name lyne --max-results 100 \ | |
| jq '.TableList[].Name' \ | |
| tr '\n' ' ' \ | |
| xargs -I {} echo "aws glue batch-delete-table --database-name lyne --tables-to-delete {}" \ | |
| sh - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment