How to delete / drop multiple tables in AWS athena?

Vidy picture Vidy · Mar 29, 2018 · Viewed 8.2k times · Source

I am trying to drop few tables from Athena and I cannot run multiple DROP queries at same time. Is there a way to do it?

Thanks!

Answer

MiaeKim picture MiaeKim · Dec 28, 2018

You can use aws-cli batch-delete-table to delete multiple table at once.

aws glue batch-delete-table \
--database-name <database-name> \
--tables-to-delete "<table1-name>" "<table2-name>" "<table3-name>" ...