Athena randomly adding decimals and digits to values that don't have them in S3

0

I have an int stored in my s3 file and the table has int as a type. However, randomly athena seems to be adding a .0 to the end of the int for some files and not others and returning the following error:

'HIVE_BAD_DATA: Error reading field value: For input string: "638.0" This query ran against the ‘***********' database, unless qualified by the query. Please post the error message on our forum or contact customer support with Query ID: 86d934ea-4c17-4f41-af4b-a87f50bba7be'

However, I checked the file in question and the value is definitely: "stay_duration_in_days": 638

I noticed also other values such as id which is also randomly for some files getting .0 added to it even though its stored in the file as: id": 5496946851911,

Has anyone seen this behaviour before?

Niall
asked 24 days ago72 views
1 Answer
1
Accepted Answer

Found my issue. S3 query with select in the UI is returning the value as an int but when downloading the file and checking with text editor it is indeed a float.

Niall
answered 24 days ago
profile picture
EXPERT
reviewed 24 days 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