HIVE_PARTITION_SCHEMA_MISMATCH - Athena error on S3 Parquet file

0

Getting below error while querying S3 parquet file from Athena. The schema has changed from timestamp to string for one of the columns, is there any workaround to have the latest schema changed to string (Alter table and msck repair table didn't work).

HIVE_PARTITION_SCHEMA_MISMATCH: There is a mismatch between the table and partition schemas. The types are incompatible and cannot be coerced. The column 'birth_year' in table 'curated_ndb_datapipeline.registered_nurse' is declared as type 'timestamp', but partition 'data_year=2021/prov_terr_reg=959' declared column 'birth_year' as type 'string'

質問済み 2年前1290ビュー
1回答
0

If all partitions have the same schema with the column defined as string and only the table has the column defined as timestamp you could try to:

  1. run a Glue crawler and see if it correctly updates the table
  2. use the Glue APis to update the column data type where needed (if it is only at table level you could consider to do it in the console).

hope this helps.

AWS
エキスパート
回答済み 2年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ