回答

1

最近,您可以使用特定的僞列來訪問S3中的對象的路徑和大小以獲得沿襲信息。

http://docs.aws.amazon.com/redshift/latest/dg/c-spectrum-external-tables.html#c-spectrum-external-tables-pseudocolumns

對於這樣的查詢的一個例子是:

>> select distinct "$path", "$size" from spectrum.sales_part; 

$path         | $size 
---------------------------------------+------- 
s3://awssampledbuswest2/tickit/spectrum/sales_partition/saledate=2008-01/ | 1616 
s3://awssampledbuswest2/tickit/spectrum/sales_partition/saledate=2008-02/ | 1444 
s3://awssampledbuswest2/tickit/spectrum/sales_partition/saledate=2008-02/ | 1444 
相關問題