1

I have hosted my data on S3 Bucket in parquet format and i am trying to access it using Athena. I can see i can successfully access the hosted table. I detected something fishy when i try to access a column "createdon".

createdon is a timestamp column and it reflects same on Athena table, but when i try to query it using the provided SQL below query

SELECT createdon FROM "uat-raw"."opportunity" limit 10;

Unexpected output :  
+51140-02-21 19:00:00.000  
+51140-02-21 21:46:40.000  
+51140-02-22 00:50:00.000    
+51140-02-22 03:53:20.000   
+51140-02-22 06:56:40.000  
+51140-02-22 09:43:20.000  
+51140-02-22 12:46:40.000  


Expected output: 
2019-02-21 19:00:00.000
2019-02-21 21:46:40.000
2019-02-22 00:50:00.000
2019-02-22 03:53:20.000
2019-02-22 06:56:40.000
2019-02-22 09:43:20.000
2019-02-22 12:46:40.000

can any one help me with the same ?? and also i have attached pic for more information.

I expect an SQL query which i can use to query my data on S3 from Athena.

Pic for more info

Dinesh R
  • 21
  • 1
  • If you can share sample data along with DDL of your table, you might get a fast response. – Aftab Ansari Nov 14 '19 at 10:13
  • Expected output mentioned on the above post is the data sample for that particular column. – Dinesh R Nov 14 '19 at 10:46
  • My guess is the timestamps are in `TIMESTAMP_MICROS`. This is not supported in Presto, which Athena is based on. AFAICT this is a deprecated method of representing timestamps in Parquet. I'd suggest that you create an issue in Presto https://github.com/prestosql/presto/issues/ and talk to Athena support about it. – Piotr Findeisen Nov 14 '19 at 16:18

0 Answers0