Hive Bad Data - error in athena

0

I am creating feature groups using sagemaker feature store service. So once a feature group is created, a awsDataCatalog (table) will be automatically created in athena console. While doing this process, I am getting the following errorEnter image description here

2개 답변
0

The table created in Athena is configuring field ncustomerid to use bigint which is not effectively convertible to a int based type as bigint. What's the data type of ncustomerid in schema definition of the feature group ? Are you using ncustomerid as record identifier ?

AWS
답변함 일 년 전
  • It's a double type. I don't know why athena is automatically taking it as bigint and Its not the record identifier. Its another ID column and this customerID , I am having it for merging purposes.

0

If the customerid is 0 on any of the parquet file processed earlier(using which the table definition is created in glue catalog by crawler) had only '0' for this field on all the rows then it is possible for glue crawler to have assigned 'bigint' for that field in table definition but the later files which has 'double' data will have data type as 'double' on only its partition in the catalog. you can write a python code to iterate on all the files in the bucket/prefix and find out dtype of that column in each file and spit out only the file name(s) that has 'bigint' as dtype. once you the files which has this problem, address the data issue by converting data to double fomat or drop the file . After the fix, drop the Athena table and run crawler again.

AWS
답변함 일 년 전

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

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

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

관련 콘텐츠