"Could not serialize column Error" in Athena


I am trying to use the crowdstrike.crowdstrike_summary.removable_media_write_hour database but am getting the following serialization error: "SERIALIZATION_ERROR: Could not serialize column 'cem_employment_start_date' of type 'timestamp(3)' at position 1:28. This query ran against the "crowdstrike_summary" database, unless qualified by the query. Please post the error message on our forum or contact customer support with Query Id: 1e850429-dd42-48b8-8db3-0936c8ec2775". The query I am running is the following: "SELECT * FROM "crowdstrike_summary"."removable_media_write_hour" limit 10;"

asked a year ago1717 views
1 Answer

Cause: Athena engine version 3 checks to make sure that the precision of timestamps in the data is the same as the precision specified for the column data type in the table specification. Currently, this precision is always 3. If the data has a precision greater than this, queries fail with the error noted. reference: https://docs.aws.amazon.com/athena/latest/ug/engine-versions-reference-0003.html

If you need date from the column, you can try SELECT DATE(my_problem_column) FROM my_table. Basically changing the format of timestamp to date type.

answered a year ago
reviewed 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.

Guidelines for Answering Questions