- Newest
- Most votes
- Most comments
Currently, Amazon Athena and AWS Glue do not provide a built-in feature to automatically display the most recent data update time based on the actual content of the tables. The metadata information stored in the AWS Glue Data Catalog, which Athena uses, includes fields like creation time and last access time for tables, but these do not necessarily reflect the latest update to the data itself.
Your approach of periodically computing the maximum timestamp from the data and updating the table's metadata in the AWS Glue Data Catalog could work as a workaround. This would allow you to see the last update time in the Athena UI, but as you mentioned, it requires additional setup and maintenance.
For notebooks in Athena, there is a LastModifiedTime field in the metadata, but this applies to the notebook itself, not the underlying data.
As for Data Catalog views in Athena, they have certain limitations and do not provide direct information about the last data update time. These views are more focused on providing a way to query data without direct access to underlying base tables.
Currently, there are no publicly announced plans from AWS to introduce a feature that automatically displays the last data update time based on the actual data content in Athena or Glue consoles. However, AWS regularly updates its services based on customer feedback, so it's possible such a feature could be considered in the future.
For now, your proposed solution of updating the metadata periodically seems to be a viable workaround. Alternatively, you could consider creating a separate metadata table that stores the last update time for each of your data tables. This table could be updated as part of your data pipeline and queried alongside your main data when needed.
Another approach could be to use AWS Glue crawlers to regularly scan your data and update the metadata. While this wouldn't directly show the last data update time, it would ensure that the metadata in the Glue Data Catalog is up-to-date with your actual data structure and could potentially be customized to capture last update times.
Remember that any custom solution will require careful design to ensure it doesn't negatively impact performance or introduce unnecessary complexity to your data architecture.
Sources
TableMetadata - Amazon Athena
NotebookMetadata - Amazon Athena
Use Data Catalog views in Athena - Amazon Athena
Use AWS Glue Data Catalog to connect to your data - Amazon Athena
SessionStatus - Amazon Athena
answered 2 years ago
Relevant content
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
