Data_101
Data_101

Reputation: 953

Can't drop Athena table

I have a table in AWS Athena called: qos-row-id

I have tried to delete the table I have created.

DROP TABLE qos-row-id;

I recevive the following message every time I try to.

line 1:15: mismatched input '-' expecting {<eof>, '.'} (service: amazonathena; status code: 400; error code: invalidrequestexception; request id: acd8a81c-8d3c-4add-9308-303980629029)

Upvotes: 2

Views: 2893

Answers (2)

Kfactor21
Kfactor21

Reputation: 412

I have faced a similar one,considering you have delete access,

Try using the following syntax (look carefully at the back quotes `..`):

DROP TABLE `<DBNAME>.<qos-row-id>`;

Apart from this you can obviously use the GUI feature to delete.

enter image description here

Upvotes: 4

Kishore Bharathy
Kishore Bharathy

Reputation: 441

Another easier way to delete this table is using the AWS glue data catalog where you go and delete the table using the delete table option in the action drop down.

enter image description here

Important Note : Make sure that you don't create tables with an Hyphen, in your case (qos-row-id). Trying using an underscore(qos_row_id) in tablenames. This worked for me.

Upvotes: 1

Related Questions