Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Amazon Redshift Cookbook
  • Table Of Contents Toc
Amazon Redshift Cookbook

Amazon Redshift Cookbook - Second Edition

By : Shruti Worlikar, Harshida Patel, Anusha Challa
close
close
Amazon Redshift Cookbook

Amazon Redshift Cookbook

By: Shruti Worlikar, Harshida Patel, Anusha Challa

Overview of this book

Amazon Redshift Cookbook offers comprehensive guidance for leveraging AWS's fully managed cloud data warehousing service. Whether you're building new data warehouse workloads or migrating traditional on-premises platforms to the cloud, this essential resource delivers proven implementation strategies. Written by AWS specialists, these easy-to-follow recipes will equip you with the knowledge to successfully implement Amazon Redshift-based data analytics solutions using established best practices. The book focuses on Redshift architecture, showing you how to perform database administration tasks on Redshift. You'll learn how to optimize your data warehouse to quickly execute complex analytic queries against very large datasets. The book covers recipes to help you take full advantage of Redshift's columnar architecture and managed services. You'll discover how to deploy fully automated and highly scalable extract, transform, and load (ETL) processes, helping you minimize the operational effort that you invest in managing regular ETL pipelines and ensuring the timely and accurate refreshing of your data warehouse. By the end of the Redshift book, you'll be able to implement a Redshift-based data analytics solution by adopting best-practice approaches for solving commonly faced problems. *Email sign-up and proof of purchase required
Table of Contents (17 chapters)
close
close
14
Other Books You May Enjoy
15
Index

Connecting to Amazon Redshift using SQL Workbench/J client

There are multiple ways to connect to the Amazon Redshift data warehouse, but one of the most popular options is to connect using a UI based tool. SQL Workbench/J is a free cross-platform SQL query tool, which can be used to connect using your own local client.

Getting ready

To complete this recipe, you will need:

  • An Amazon Redshift data warehouse (serverless or provisioned cluster) and its login credentials (username and password).
  • Install SQL Workbench/J (https://www.sql-workbench.eu/manual/install.html).
  • Download Amazon Redshift Driver. Visit https://docs.aws.amazon.com/redshift/latest/mgmt/configuring-connections.html to download the latest driver version.
  • Modify the security group attached to the Amazon Redshift cluster to allow connection from a local client.
  • For provisioned clusters, navigate to Amazon Redshift | Provisioned clusters dashboard | myredshiftcluster | General information to find the JDBC/ODBC URL to connect to an Amazon Redshift provisioned cluster.
  • For Serverless, navigate to Amazon Redshift | Redshift Serverless | myredshiftwg | General information to find the JDBC/ODBC URL to connect to Amazon Redshift serverless clusters.

How to do it…

The following steps will enable you to connect using the SQL Workbench/J client tool from your computer:

  1. Open SQL Workbench/J by double-clicking on the SQLWorkbench.exe (on Windows) or SQLWorkbenchJ application (on Mac).
  2. In the SQL Workbench/J menu, select File and then select Connect window.
  3. Select Create a new connection profile.
  4. In the New profile box, choose any profile name, such as examplecluster_jdbc.
  5. Select Manage Drivers. The Manage Drivers dialog will open; select Amazon Redshift:
Figure 1.8 – SQL Workbench/J Manage drivers box

Figure 1.8 – SQL Workbench/J Manage drivers box

  1. Select the folder icon adjacent to the Library box, browse and point it to the Amazon Redshift driver location, and then select Choose:
Figure 1.9 – SQL Workbench/J to select Amazon Redshift driver

Figure 1.9 – SQL Workbench/J to select Amazon Redshift driver

  1. To set up the profile for the Amazon Redshift connection, enter the following details:
    1. In the Driver box, select the Amazon Redshift drive.
    2. In URL, paste the Amazon Redshift cluster JDBC URL obtained previously.
    3. In Username, enter the username (or the master user name) associated with the cluster.
    4. In Password, provide the password associated with the username.
    5. Checkmark the Autocommit box.
    6. Select the Save profile list icon, as shown in the following screenshot, and select OK:
    A screenshot of a computer

AI-generated content may be incorrect.

    Figure 1.10 – Amazon Redshift Connection Profile

  2. After setting up the JDBC connection, you can use the query to ensure you are connected to the Amazon Redshift cluster:
    select * from information_schema.tables;
    

A list of records will appear in the Results tab if the connection was successful:

Figure 1.11 – Sample query output from SQL Workbench/J

Figure 1.11 – Sample query output from SQL Workbench/J

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Amazon Redshift Cookbook
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon