【发布时间】:2020-04-19 19:57:06
【问题描述】:
我有一个包含 TB 结构化数据的文件夹,它们都遵循固定模式。文件夹结构如下:
s3://main-bucket/
folder-1/ <= One folder will only contain data from one algorithm
part-0000-1.csv <= Created on 06/01/2019 by algorithm1
part-0000-2.csv <= Created on 06/01/2019 by algorithm1
folder-2/
part-1000-1.csv <= Created on 06/02/2019 by algorithm2
part-1000-2.csv <= Created on 06/02/2019 by algorithm2
使用 Spark 或 Athena 查询主存储桶效率非常低,我想将其转换为如下格式:
s3://data-bucket/
algorithm1/ <= derived from a column in folder-1/part files and all rows in this folder has the same algorithm value
2019/
06/
01/
part-0001.parquet
algorithm2/
2019/
06/
02/
part-0001.parquet
无论如何要这样做?
【问题讨论】:
标签: amazon-web-services apache-spark amazon-s3 aws-glue amazon-athena