Book Image

Getting Started with Amazon Redshift

By : Stefan Bauer
Book Image

Getting Started with Amazon Redshift

By: Stefan Bauer

Overview of this book

<p>Amazon Redshift is a fast, fully managed, petabyte-scale data warehouse service. It provides an excellent approach to analyzing all your data using your existing business intelligence tools.</p> <p>Getting Started with Amazon Redshift is an easy-to-read, descriptive guide that breaks down the complex topics of data warehousing and Amazon Redshift. You will learn the fundamentals of Redshift technology and how to implement your own Redshift cluster, through practical, real-world examples. This exciting new technology is a powerful tool in your arsenal of data management and this book is a must-have to implement and manage your next enterprise Data Warehouse.</p> <p>Packed with detailed descriptions, diagrams, and explanations, Getting Started with Amazon Redshift will bring you along, regardless of your current level of understanding, to a point where you will feel comfortable with running your own Redshift cluster. The author's own experiences will give you an understanding of what you will need to consider when working with your own data. You will also learn about how compression has been implemented and what that means relative to a column store database structure. As you progress, you will gain an understanding of monitoring techniques, performance considerations, and what it will take to successfully run your Amazon Redshift cluster on a day-to-day basis. There truly is something in this book for everyone who is interested in learning about this technology.</p>
Table of Contents (14 chapters)

The PSQL command line


If you are interested in running commands other than those available in the CLI interface, you can install the standard Postgres PSQL command-line tools. The Amazon CLI tool is clearly focused on management functionality and not on the execution of queries. To connect using the psql command line, you need three values: -h (hostname), -p (port), and -U (user). You will then be prompted for the password as shown in the following command:

# psql -h <Endpoint> -p 5439 -U <user>
There are many other options to pass in files, how you wish to have the output formatted, or setting variables as described here.

Connection options

The following are the connection options:

  • -h, --host=HOSTNAME: This is the database server host or socket directory (default is local socket)

  • -p, --port=PORT: This is the database server port (default is 5432)

  • -U, --username=USERNAME: This is the database username (default is root)

  • -w, --no-password: This never prompts for a password

  • -W, --password...