5

I have an external table in Athena linked to a folder in S3. There are some pseudocolumns in Presto that allows me to get some metadata information about the the files sitting in that folder (for example, the $path pseudocolumn).

I wonder if there is a pseudocolumn where I can get the last modified timestamp of a file in S3 by using a query in AWS Athena.

d4nielfr4nco
  • 635
  • 1
  • 6
  • 17

1 Answers1

4

Trino has the $file_modified_time metadata column for the Hive connector. You can query it like this:

SELECT *, "$path", "$file_size", "$file_modified_time"
FROM example.web.page_views;
David Phillips
  • 10,723
  • 6
  • 41
  • 54