Data in partitions on S3 bucket, getting below error in preview data query:

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 'site_rank' in table 'luci-data.luci-newslinkdata' is declared as type 'double', but partition 'partition_0=2011-12-30' declared column 'site_rank' as type 'bigint'. then, I followed the steps mentioned in: repost.aws/questions/QU1vPk1069Q5qg4iyuQWTk6Q/while-importing-s3-data-into-quicksight-from-glue-database-getting-the-following-error#ANMuJykKnKSD-jKoZk2tbvqw after updating in glue crawler: Update all new and existing partitions with metadata from the table Now the error is as follows: HIVE_BAD_DATA: Field site_rank's type INT64 in parquet file s3://rnvd-s3-luci-poc/NewsLinkData/2011-06-26/output_4404.parquet is incompatible with type double defined in table schema

已提問 1 年前檢視次數 265 次
1 個回答
0

What you are trying to do is not allowed, you cannot just change the types in the metadata if they don't match (or are compatible) with the actual data files.
If you don't want to update the data files, you can read as bigint and then cast in your query.
If you have mixture of parquet files with both types, the table is broken, replace/delete one of the set of files.

profile pictureAWS
專家
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南