12

I'm getting this error from AWS Athena:

HIVE_PARTITION_SCHEMA_MISMATCH: There is a mismatch between the table and partition schemas. The types are incompatible and cannot be coerced. The column 'id' in table 'db.app_events' is declared as type 'string', but partition 'xxxxx' declared column 'data.entity_price' as type 'double'.

there is no connection with those fields but it gives an error. Is it a bug or am I missing something?

Piotr Findeisen
  • 19,480
  • 2
  • 52
  • 82
Burak
  • 5,706
  • 20
  • 70
  • 110

2 Answers2

7

Schema is kept at partition level unless you inherit schema from table. See this: https://docs.aws.amazon.com/athena/latest/ug/updates-and-partitions.html

also discussed here as well: How to solve this HIVE_PARTITION_SCHEMA_MISMATCH?

Eman
  • 831
  • 5
  • 8
0

ALTER TABLE tableName CHANGE columnName newColumnName type CASCADE;