This error happens to me anytime I try to query the 'airports' table in my database which was created by a glue crawler I created for this purpose along with 3 other datasets. They were all csv files beforehand, and I have performed each and every step of this process already in MySQL Workbench locally before trying it out on the cloud in AWS right now and I never got any errors like this when querying my airports dataset there. All I did was run this query:

SELECT * FROM "runway_db_athena"."airports" limit 10;

And this is the error message I got back:

GENERIC_INTERNAL_ERROR: SerDeException thrown initializing deserializer org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe. Cause: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe: columns has 110 elements while columns.types has 106 elements! This query ran against the "runway_db_athena" database, unless qualified by the query. Please post the error message on our forum or contact customer support with Query Id: 1b71aed6-8e34-4618-9568-930c1b19dd92

Just as a sanity check before posting here after getting feedback on AWS's re:Post forum that this error typically means you have a csv with more fields than the ones identified by the crawler, so, I opened up the file, hit Ctrl+-> and saw that there are 106 columns, then I opened up MySQL Workbench, created a new database, and imported this csv file using its Data Table Import Wizard, then ran a DESC and a SELECT on it and both worked just fine. Plus, Workbench triple confirmed that the 110 was the off number:

3   21  04:08:29    desc `airportandrunwaydata`.airports    106 row(s) returned 0.000 sec / 0.000 sec

And here is what that description table looks like: enter image description here

  • 1
    @J.D. I knew I should have included a screenshot, I'll be right back with that. The DESC function returns a table with two columns where each row describes each of the columns in the actual database table being described.
    – Marlen
    Apr 17 at 12:56


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.