從 Amazon S3 載入壓縮的資料檔案 - Amazon Redshift

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

從 Amazon S3 載入壓縮的資料檔案

若要載入使用 gzip、lzop 或 bzip2 壓縮的資料檔案,請併入對應的選項:GZIP、LZOP 或 BZIP2。

例如,下列命令會從使用 lzop 壓縮的檔案載入。

copy customer from 's3://mybucket/customer.lzo' iam_role 'arn:aws:iam::0123456789012:role/MyRedshiftRole' delimiter '|' lzop;
注意

如果您使用 lzop 壓縮來壓縮資料檔案,並使用 -filter 選項,則 COPY 指令不支援它。