【发布时间】:2021-12-11 14:35:58
【问题描述】:
我在 S3 中有一个文件夹结构,看起来像这样。
root/
├── parter-1/
| ├── config/
| │ ├── config.json
| │ └── feature.json
| ├── customer-1
| | ├── config/
| | │ ├── config.json
| | │ └── feature.json
| | └── data/
| | ├── model-1/
| | │ ├── input/
| | | | ├── current/
| | | | | ├── tbl1.csv
| | | | | └── tbl2.csv
| | | | └── archive/
| | | | | ├── aod=20211012/
| | | | | ├── tbl1.csv
| | | | └── tbl2.csv
| | | | └── aod=20211210/
| | | | ├── tbl1.csv
| | | | └── tbl2.csv
| | │ └── output/
| | | └──(Same as input)
| | ├── model-2/
| | │ └── (Same as model-1)
| | └── input.zip
| ├── customer-2
| . └── (Same as customer-1)
| .
| |
. └── customer-n
. └── (Same as customer-1)
└── partner-n
└── (Same as partner-1)
现在,我需要在 AWS 中生成 athena 表(用于 tb1、tbl2)等等。 具有 sanme tbl1.csv 的所有文件都具有相同的架构(列),对于 tbl2 等也是如此。我需要完全忽略目录中存在的配置文件夹、zip 文件和任何 json 文件。
最终的输出表需要是这样的。
**tbl1**
col_1 | col_2 | col_3 | partner | customer | model |
【问题讨论】:
标签: amazon-web-services amazon-s3 amazon-athena