ablog

不器用で落着きのない技術者のメモ

Redshift で UNLOAD した時のファイル suffix の命名規則

Redshift で UNLOAD した時のファイル suffix の命名規則

ネーミングルール

  • CSV
    • 圧縮なし: 000
    • gzip: 000.gz
    • bzip2: 000.bz2
    • zstd: 000.zst
  • Parquet
    • 000.parquet

検証手順

unload ('select * from public.customer')
to 's3://test-rs-copy-bucket/unload/customer_'
allowoverwrite
iam_role 'arn:aws:iam::123456789012:role/redshift-spectrum-s3-fullaccess'
csv
 parallel off;


unload ('select * from public.customer')
to 's3://test-rs-copy-bucket/unload/customer_'
allowoverwrite
iam_role 'arn:aws:iam::123456789012:role/redshift-spectrum-s3-fullaccess'
csv gzip
 parallel off;

unload ('select * from public.customer')
to 's3://test-rs-copy-bucket/unload/customer_'
allowoverwrite
iam_role 'arn:aws:iam::123456789012:role/redshift-spectrum-s3-fullaccess'
csv zstd
 parallel off;

unload ('select * from public.customer')
to 's3://test-rs-copy-bucket/unload/customer_'
allowoverwrite
iam_role 'arn:aws:iam::123456789012:role/redshift-spectrum-s3-fullaccess'
csv bzip2
 parallel off;
 
 
unload ('select * from public.customer')
to 's3://test-rs-copy-bucket/unload/customer_'
allowoverwrite
iam_role 'arn:aws:iam::123456789012:role/redshift-spectrum-s3-fullaccess'
parquet
parallel off;


unload ('select * from public.customer')
to 's3://test-rs-copy-bucket/unload/customer_'
allowoverwrite
iam_role 'arn:aws:iam::123456789012:role/redshift-spectrum-s3-fullaccess'
json gzip
parallel off;

unload ('select * from public.customer')
to 's3://test-rs-copy-bucket/unload/customer_'
allowoverwrite
iam_role 'arn:aws:iam::123456789012:role/redshift-spectrum-s3-fullaccess'
json bzip2
parallel off;

unload ('select * from public.customer')
to 's3://test-rs-copy-bucket/unload/customer_'
allowoverwrite
iam_role 'arn:aws:iam::123456789012:role/redshift-spectrum-s3-fullaccess'
json zstd
parallel off;

unload ('select * from public.customer')
to 's3://test-rs-copy-bucket/unload/customer_'
allowoverwrite
iam_role 'arn:aws:iam::123456789012:role/redshift-spectrum-s3-fullaccess'
json 
parallel off;