- Newest
- Most votes
- Most comments
Hello,
The error that you re seeing occurs because there is a schema difference between the schema of particular partition and the schema of table defined in your Glue catalog. In Athena, a table and its partitions must use the same data formats but their schemas may differ. When you create a new partition, that partition usually inherits the schema of the table. Over time, the schemas may start to differ. Please do read this documentation that explains the several reasons for the cause of the error.
If in case you have crawler for this table, then please re-run the crawler by setting the option "Update all new and existing partitions with metadata from the table". This should essentially update the schema.
In case the above does not work out then it would be better to drop the corresponding partition and then recreate the partition.
ALTER TABLE DROP PARTITION
ALTER TABLE ADD PARTITION
https://docs.aws.amazon.com/athena/latest/ug/alter-table-drop-partition.html https://docs.aws.amazon.com/athena/latest/ug/alter-table-add-partition.html The above documentations should be able to help you.
Relevant content
- asked a year ago
- asked 3 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 4 years ago
- AWS OFFICIALUpdated 8 days ago