Search code examples
amazon-web-servicesamazon-s3parquetamazon-athenaaws-glue-data-catalog

In AWS Athena - how to show the timestamp column with required format?


I have a parquet file in AWS S3 with timestamp column as below

updated_time = "2014-11-13T03:10:17.098765Z".

I created a glue catalog and query it from AWS athena.

In Athena I can able to see only 3 precision value in milliseconds fields "2014-11-13 03:10:17.098". Is there any option to get all 6 precision value as same as in S3 as microseconds.

Actual result in Athena

2014-11-13 03:10:17.098

Expected result in Athena

2014-11-13 03:10:17.098765

Solution

  • Presto supports timestamp granularity up to milliseconds and not microseconds. Since Athena is basically managed Presto, the Presto limitations are valid for Athena as well.