
12. Click OK.
Step 5: Load Sample Data from Amazon S3
At this point you have a database called dev and you are connected to it. Now you will create some tables
in the database, upload data to the tables, and try a query. For your convenience, the sample data you
will load is available in Amazon S3 buckets.You will choose a bucket in the same region you created
your cluster. To copy this sample data you will need AWS account credentials (access key ID and secret
access key). Only authenticated users can access this data.
Note
Before you proceed, ensure that your SQL Workbench/J client is connected to the cluster.
After you complete this step, you can find more information about Amazon Redshift and reset your
environment at Where Do I Go From Here? (p. 17).
1. Create tables.
Copy and execute the following create table statements to create tables in the dev database. For
more information about the syntax, go to CREATE TABLE in the Amazon Redshift Developer Guide.
create table users(
userid integer not null distkey sortkey,
username char(8),
firstname varchar(30),
lastname varchar(30),
city varchar(30),
state char(2),
email varchar(100),
phone char(14),
likesports boolean,
liketheatre boolean,
likeconcerts boolean,
likejazz boolean,
likeclassical boolean,
likeopera boolean,
likerock boolean,
likevegas boolean,
API Version 2012-12-01
13
Amazon Redshift Getting Started Guide
Step 5: Load Sample Data from Amazon S3
Kommentare zu diesen Handbüchern