Partition mismatch error

0

HIVE_PARTITION_SCHEMA_MISMATCH: There is a mismatch between the table and partition schemas. The types are incompatible and cannot be coerced. The column 'harsh.cornering.angle' in table 'teltonika_integration.teltonika' is declared as type 'double', but partition 'partition_0=2024/partition_1=02/partition_2=20/partition_3=12' declared column 'harsh.cornering.event' as type 'boolean'.

Please post the error message on our forum or contact customer support with Query Id: bc05b028-eb70-47ac-92db-55238f37f0ad

And my Athena query is : SELECT * FROM "AwsDataCatalog"."teltonika_integration"."teltonika" limit 10;

This is the error i am getting and the error seems quite irrelevant. There is no connection between these 2 columns

Amit
질문됨 3달 전131회 조회
1개 답변
0

Hello,

Generally above error occurs when partition schema is not compatible with table schema. I understand in error its showing two different columns but that means that you need to check both the columns at partition level mentioned in error and tabel level to verify the schema. If you find discrepancy then you need to update your partition schema and make sure its compatible with table schema.

It seems like you are using crawler to load the partition. If your file format is csv,josn or text file format then you can use crawler with "Update all new and existing partitions with metadata from the table" to overcome this issue.

https://repost.aws/knowledge-center/athena-hive-partition-schema-mismatch

If your file format is structured like paruqet,orc then you need to check the file again for mentioned partition and verify the schema. If it contains incompatible schema then you need to generate that file again with consistent schema to avoid this issue as incas of parquet it reference the metadat from file footer itself.

AWS
답변함 2달 전
profile picture
전문가
검토됨 한 달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠