Skip to content

Help with HIVE_BAD_DATA: No columns in row group error

0

Started getting this error today when querying data from Athena in a table created from parquet files in our S3 bucket:

Enter image description here

I'm thinking a bad file somewhere but unable to narrow it down. Any steps or tips to resolve would be much appreciated. Thanks!

1 Answer
0

Hello, I got the same error. In my case the issue was, that the database had two columns "integerValue" and "doubleValue". Those Columns where defined as integer and double. When a cell of the column had no value, the cell was not empty it had "nan" as a value. While most tools understand that nan (not a number) stands for an emty datapoint, AWS Athena handles it like a string. That is why this error occurs. Athena reads a string inside a column that is predefined as integer or double and then throws this error.

In my case the solution was, to change the columns predefined datatype from integer or double to string. AWS Athena now loads all data without any problems, but you may have to change the dataformat after loading the data with AWS Athena to perform mathematical functions with those values.

I hope this helps to solve your problem.

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.