【问题标题】:Reading multiple json file from S3 using Amazon Athena使用 Amazon Athena 从 S3 读取多个 json 文件
【发布时间】:2020-05-05 16:04:00
【问题描述】:

我将员工的日常活动作为 employee.json 存储在一个文件夹中,这是我存储在 S3 中的数据结构。现在我想阅读所有员工在某个日期范围内的活动。如何使用 Amazon Athena 服务做到这一点?或者我应该写一个客户代码来做到这一点。

empId1-->2020-03-01-->employee.json
         2020-03-02-->employee.json
         2020-03-03-->employee.json
         2020-03-04-->employee.json
         2020-03-05-->employee.json

empId2-->2020-03-01-->employee.json
         2020-03-02-->employee.json
         2020-03-03-->employee.json
         2020-03-04-->employee.json
         2020-03-05-->employee.json

empId3-->2020-03-01-->employee.json
         2020-03-02-->employee.json
         2020-03-03-->employee.json
         2020-03-04-->employee.json
         2020-03-05-->employee.json

empId4-->2020-03-01-->employee.json
         2020-03-02-->employee.json
         2020-03-03-->employee.json
         2020-03-04-->employee.json
         2020-03-05-->employee.json

【问题讨论】:

    标签: java python amazon-web-services amazon-s3 amazon-athena


    【解决方案1】:

    尝试查看 Athena 中的分区:https://docs.aws.amazon.com/athena/latest/ug/partitions.html

    这将允许您对基于前缀的 S3 文件子集运行查询。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-12-02
      • 2019-03-11
      • 2017-05-04
      • 2018-01-09
      • 2017-04-21
      • 2019-10-27
      相关资源
      最近更新 更多