使用 s3 路径的子字符串进行分区
Partitioning using a substring of the s3 path
我们有一个 s3 存储桶,其中包含以下格式的文件:
6ugdasznp56o_2020-09-04T140000_6081c358e0417bdd81284b0cf7a6b321_2853a9.csv.gz
是否可以定义一个storage.location.template
如下:
6ugdasznp56o_${year}-${month}-${date}T${hour}0000_6081c358e0417bdd81284b0cf7a6b321_2853a9.csv.gz
要在此 s3 存储桶中对我的文件进行分区?
分区不能在文件级别发生,而只能在文件夹结构上发生,另请参阅 Table Location in Amazon S3:
Do not use any of the following items for specifying the LOCATION
for your data.
- Do not use filenames, underscores, wildcards, or glob patterns for specifying file locations.
不会的例子:
...
s3://path_to_bucket/mySpecialFile.dat
s3://bucketname/prefix/filename.csv
...
我们有一个 s3 存储桶,其中包含以下格式的文件:
6ugdasznp56o_2020-09-04T140000_6081c358e0417bdd81284b0cf7a6b321_2853a9.csv.gz
是否可以定义一个storage.location.template
如下:
6ugdasznp56o_${year}-${month}-${date}T${hour}0000_6081c358e0417bdd81284b0cf7a6b321_2853a9.csv.gz
要在此 s3 存储桶中对我的文件进行分区?
分区不能在文件级别发生,而只能在文件夹结构上发生,另请参阅 Table Location in Amazon S3:
Do not use any of the following items for specifying the
LOCATION
for your data.
- Do not use filenames, underscores, wildcards, or glob patterns for specifying file locations.
不会的例子:
...
s3://path_to_bucket/mySpecialFile.dat
s3://bucketname/prefix/filename.csv
...