Amazon Redshift Manual de usuario Pagina 18

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 24
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 17
command. For more information about the syntax, go to COPY in the Amazon Redshift Database
Developer Guide.
Copy and execute the following copy statements to upload data from Amazon S3 to the tables in the
dev database.
copy users from 's3://<region-specific-bucket-name>/tickit/allusers_pipe.txt'
CREDENTIALS 'aws_access_key_id=<Your-Access-Key-ID>;aws_secret_ac
cess_key=<Your-Secret-Access-Key>' delimiter '|';
copy venue from 's3://<region-specific-bucket-name>/tickit/venue_pipe.txt'
CREDENTIALS 'aws_access_key_id=<Your-Access-Key-ID>;aws_secret_ac
cess_key=<Your-Secret-Access-Key>' delimiter '|';
copy category from 's3://<region-specific-bucket-name>/tickit/cat
egory_pipe.txt' CREDENTIALS 'aws_access_key_id=<Your-Access-Key-
ID>;aws_secret_access_key=<Your-Secret-Access-Key>' delimiter '|';
copy date from 's3://<region-specific-bucket-name>/tickit/date2008_pipe.txt'
CREDENTIALS 'aws_access_key_id=<Your-Access-Key-ID>;aws_secret_ac
cess_key=<Your-Secret-Access-Key>' delimiter '|';
copy event from 's3://<region-specific-bucket-name>/tickit/allevents_pipe.txt'
CREDENTIALS 'aws_access_key_id=<Your-Access-Key-ID>;aws_secret_ac
cess_key=<Your-Secret-Access-Key>' delimiter '|'
timeformat 'YYYY-MM-DD HH:MI:SS';
copy listing from 's3://<region-specific-bucket-name>/tickit/list
ings_pipe.txt' CREDENTIALS 'aws_access_key_id=<Your-Access-Key-
ID>;aws_secret_access_key=<Your-Secret-Access-Key>' delimiter '|';
copy sales from 's3://<region-specific-bucket-name>/tickit/sales_tab.txt'CRE
DENTIALS 'aws_access_key_id=<Your-Access-Key-ID>;aws_secret_access_key=<Your-
Secret-Access-Key>'
delimiter '\t' timeformat 'MM/DD/YYYY HH:MI:SS';
The values for <Your-Access-Key-ID> and <Your-Secret-Access-Key> are the AWS credentials
needed to access the Amazon S3 objects. The sample data for this tutorial is provided in Amazon
S3 buckets that give read access to all authenticated AWS users, so any valid AWS credentials that
permit access to Amazon S3 will work. If you need to create new access keys, go to Administering
Access Keys for IAM Users. Use the following table to find the correct bucket name to use.
<region-specific-bucket-name>Region
awssampledbUS East (N. Virginia)
awssampledbuswest2US West (Oregon)
awssampledbeucentral1EU (Frankfurt)
awssampledbeuwest1EU (Ireland)
awssampledbapsoutheast1Asia Pacific (Singapore)
awssampledbapsoutheast2Asia Pacific (Sydney)
awssampledbapnortheast1Asia Pacific (Tokyo)
Note
If you want to upload your own data instead of the sample data, you must have your own
Amazon S3 bucket. For information about creating a bucket and uploading data, go to
Creating a Bucket and Uploading Objects into Amazon S3 in the Amazon Simple Storage
Service Console User Guide.
API Version 2012-12-01
15
Amazon Redshift Getting Started Guide
Step 5: Load Sample Data from Amazon S3
Vista de pagina 17
1 2 ... 13 14 15 16 17 18 19 20 21 22 23 24

Comentarios a estos manuales

Sin comentarios