AWS S3 select_object_content TIMESTAMP column

0

Hi I got a parquet file in my bucket i am trying to read using the select_object_content API.

client.select_object_content(
            Bucket="bucket-name",
            Key=file, #"path/file.parquet",
            ExpressionType='SQL',
            Expression=f'SELECT "Time" as t1, "col2"  FROM s3object',
            InputSerialization=input_spec,
            OutputSerialization={'JSON': {}}
            #ScanRange=scan_range
        )

Here the column "Time" is TimestampType column. When i make the call what i get back in the response is some long number that looks like this "45357758218963327341449984"

I am trying to understand what this number represent ? Is there way i can get back the column in iso-format. I initially thought this number is the byte representation that happens when the timestamp value is converted to a binary encoding represenation. But when i applied the logic mentioned https://stackoverflow.com/questions/54657496/how-to-write-timestamp-logical-type-int96-to-parquet-using-parquetwriter It didnt reproduce the value i expected.

Any help is appreciated.

gitfy
질문됨 2년 전312회 조회
1개 답변
0

Timestamp sometimes stores as Epoch.

https://www.epochconverter.com/

  • For example, the current time I'm drafting this response in Epoch is 1653878630
  • The number you've given as an example using Epoch woul be GMT: Saturday, May 2, 3407 1:16:58.963 AM
AWS
Rachel
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인