0
votes

I'm looking for a simple way to load data from S3 to Redshift.

I've tried AWS Glue and Firehouse, without success.

EDIT: As right now it's not the best way to do it but AWS Glue is working. I'll revist the COPY command to try to get better results!

Thanks guys!

1
redshift "copy" command docs.aws.amazon.com/redshift/latest/dg/r_COPY.html or Redshift Spectrum .Jon Scott

1 Answers

0
votes

The simplest solution is to use the COPY command, e.g.

create table my_table(...);

copy my_table
from 's3://my_bucket/my_prefix/data.txt'
iam_role 'arn:aws:iam::<aws-account-id>:role/<role-name>'
region 'us-west-2';

By default, the data file should contain pipe-separated plain text columns. There are plenty more options: JSON, Parquet, using a manifest file to load from multiple files, etc.

UNLOAD is the reverse command (dumping a table to S3).