Search code examples
amazon-web-servicesamazon-athena

AWS Athena View Will not Drop


I'm trying to delete a view from Athena and continue to come across this error.

com.facebook.presto.v217.spi.PrestoException: Row type must have at least one parameter (Service: null; Status Code: 0; Error Code: null; Request ID: null; Proxy: null)

The view itself runs and returns as normal, but the DROP VIEW command produces the error. Also, I've tried to overwrite the view with a different query and still get the error.


Solution

  • You can try deleting the view object from the Glue Data Catalog directly (that's where Athena stores it). You can do that either by navigating to the table in the Glue console, or by running this command:

    $ aws glue delete-table \
      --region THE_REGION \
      --database-name THE_DATABASE \
      --name THE_NAME_OF_THE_VIEW