- Le plus récent
- Le plus de votes
- La plupart des commentaires
This appears to be a limitation in how Athena handles schema evolution for Iceberg tables that contain complex data types like MAP columns. While Athena does support adding columns to Iceberg tables as shown in your first example, there seems to be an issue specifically when the table already contains a MAP data type.
This isn't explicitly documented as a limitation, but based on the behavior you're experiencing, it appears that Athena's implementation of ALTER TABLE ADD COLUMNS may have compatibility issues with tables containing MAP columns.
As a workaround, you might consider:
- Using Apache Spark through Amazon EMR to alter the table schema instead of Athena
- Creating an AWS Glue ETL job to update the table schema
- Manually updating the schema through the AWS Glue Console
- Using the Iceberg Table API directly if you need programmatic access
If you absolutely need to use both MAP columns and schema evolution in Athena, you might need to redesign your table structure to avoid using MAP types, perhaps by flattening the structure or using STRUCT types instead, which are supported in Athena's ALTER TABLE ADD COLUMNS operations.
Sources
How to add a column with Korean characters in Iceberg via Athena? | AWS re:Post
ALTER TABLE ADD COLUMNS - Amazon Athena
How to add partition fields to Iceberg table | AWS re:Post
Manage Iceberg tables - Amazon Athena
Contenus pertinents
- demandé il y a 2 ans
- demandé il y a 3 ans
- AWS OFFICIELA mis à jour il y a 5 mois
