Skip to content

INVALID_FUNCTION_ARGUMENT: Invalid format: "1.759284755219E9" is malformed at ".759284755219E9"

0

When running select queries on highly partitioned large log files, we are hitting this issue.

Our log files are hundreds of MBs for each minutes and they are partitioned down to the minute in S3. Our table is created via partition projection. When querying something like 3 minutes' data, it is fine. Going up to something like 60 minutes gives us errors like this.

Looking at the error message it seems to be related to some number handling logic in Athena, maybe related to file size or something, that failed to recognize 1.xxEx as numbers.

asked a year ago182 views

1 Answer
0

This error message suggests an issue with parsing a numeric value in your data. The error "INVALID_FUNCTION_ARGUMENT: Invalid format: "1.759284755219E9" is malformed at ".759284755219E9"" typically occurs when Athena encounters a value in scientific notation that it cannot properly parse.

When working with highly partitioned large log files in Athena, there are several considerations that might help resolve this issue:

  1. Data Format Issues: The error suggests that Athena is trying to parse a value in scientific notation (1.759284755219E9) but is failing. This could be related to a timestamp or numeric field in your data that's being represented in scientific notation.

  2. Partition Projection Limitations: While partition projection is excellent for highly partitioned tables, there are limitations when dealing with very large datasets. When you increase your query range from 3 minutes to 60 minutes, you're significantly increasing the amount of data being processed, which might be exposing format issues that weren't apparent with smaller data volumes.

  3. Query Optimization: Consider using more specific partition filters to reduce the amount of data scanned. For example, if you're querying by date range, make sure you're leveraging your partition columns effectively.

  4. Type Casting: You might need to explicitly cast problematic fields to the appropriate data type in your query. For example, if a timestamp field is causing issues, try casting it to a specific format.

  5. SerDe Configuration: Check your SerDe properties in your table definition. If you're using RegexSerDe or another SerDe, you might need to adjust the pattern to better handle numeric values in scientific notation.

To resolve this issue, you could:

  • Examine your data to identify which field contains values in scientific notation
  • Modify your query to properly cast or format this field
  • Consider adjusting your table definition to better handle the data format
  • If possible, preprocess your data to convert scientific notation to standard decimal format before querying

Remember that Athena has certain limitations when dealing with very large datasets, and you might need to optimize your query approach when working with large volumes of partitioned data.
Sources
Use partition projection - Amazon Athena
How do I analyze CloudWatch Logs exports in Athena? | AWS re:Post
Considerations and limitations for SQL queries in Amazon Athena - Amazon Athena
How do I analyze CloudWatch Logs using Athena? | AWS re:Post

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.