The Redshift database

We saw how to create a Redshift cluster in Chapter 8, Creating Datasources from Redshift, we won't go through the steps again. For our vegetable contest project, we create a vegetable cluster and a vegetablesdb database. Wait till the endpoint for the cluster is ready and the endpoint is defined, and then connect to your Redshift database via this Psql command:

$ psql --host=vegetables.cenllwot8v9r.us-east-1.redshift.amazonaws.com --port=5439 --username=alexperrier --password --dbname=vegetablesdb

Once connected to the database, create the following table with this SQL query:

CREATE TABLE IF NOT EXISTS tweets ( id BIGINT primary key, screen_name varchar(255), veggie varchar(255), text varchar(65535));

Note that there ...

Get Effective Amazon Machine Learning now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.