使用 AWS Athena 可以很容易地查询 .csv 文件的名称:
select "$path", * from my_table;
我想知道是否可以对创建或修改时间戳也做同样的事情:
select "$creation_date" from my_table; select "$modification_date" from my_table;
我找不到关于这个话题的任何东西。
Athena 目前还没有这样的选项。 Athena 使用 PrestoDB,这个 feature 已经在 Trino(以前的 prestosql)中引入。
已经向 PrestoDB 提交了一个request。
此功能现在可以使用雅典娜引擎3,字段名称称为
$file_modified_time
select "$file_modified_time" from tablename
假设您没有任何不受支持的查询,从 athena v2 迁移到 v3 非常简单,您应该遵循 this 指南