Skip to content

Instantly share code, notes, and snippets.

@crowdmatt
Created April 26, 2013 00:25
Show Gist options
  • Save crowdmatt/5464314 to your computer and use it in GitHub Desktop.
Save crowdmatt/5464314 to your computer and use it in GitHub Desktop.
Example of loading data into Amazon Redshift using redshift database adapter.
ActiveRecord::Base.connection.execute(
"copy campaign_events from 's3://BUCKET/FILEPATHPREFIX/' credentials 'aws_access_key_id=XXX;aws_secret_access_key=XXX' emptyasnull blanksasnull fillrecord delimiter '|'"
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment