Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Amazon Redshift Cookbook

You're reading from   Amazon Redshift Cookbook Recipes for building modern data warehousing solutions

Arrow left icon
Product type Paperback
Published in Apr 2025
Publisher Packt
ISBN-13 9781836206910
Length 468 pages
Edition 2nd Edition
Arrow right icon
Authors (3):
Arrow left icon
Shruti Worlikar Shruti Worlikar
Author Profile Icon Shruti Worlikar
Shruti Worlikar
 Patel Patel
Author Profile Icon Patel
Patel
Anusha Challa Anusha Challa
Author Profile Icon Anusha Challa
Anusha Challa
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Preface 1. Getting Started with Amazon Redshift FREE CHAPTER 2. Data Management 3. Loading and Unloading Data 4. Zero-ETL Ingestions 5. Scalable Data Orchestration for Automation 6. Platform Authorization and Security 7. Data Authorization and Security 8. Performance Optimization 9. Cost Optimization 10. Lakehouse Architecture 11. Data Sharing with Amazon Redshift 12. Generative AI and ML with Amazon Redshift 13. Other Books You May Enjoy
14. Index
Appendix

Connecting to a data warehouse using Amazon Redshift query editor v2

The query editor v2 is a client browser-based interface available on the AWS Management Console for running SQL queries on Amazon Redshift Serverless or provisioned cluster directly. Once you have created the data warehouse, you can use query editor to jumpstart querying the cluster without needing to set up the JDBC/ODBC driver. This recipe explains how to use query editor to access a Redshift data warehouse.

Query editor V2 allows you to do the following:

  • Explore schemas
  • Run multiple DDL and DML SQL commands
  • Run single/multiple select statements
  • View query execution details
  • Save a query
  • Download a query result set up to 100 MB in CSV, text, or HTML

Getting ready

To complete this recipe, you will need:

  • An Amazon Redshift data warehouse (serverless or provisioned cluster)
  • IAM user with access to Amazon Redshift and AWS Secrets Manager
  • Store the database credentials in Amazon Secrets Manager using Recipe 2 in the Appendix

How to do it…

Here are the steps to query an Amazon Redshift data warehouse using the Amazon Redshift query editor v2.

  1. Navigate to AWS Redshift Console https://console.aws.amazon.com/redshiftv2 and select the query editor v2 from the navigation pane on the left.
  2. Choose the AWS Region (eu-west-1) or corresponding region on the top right of the screen.
  3. With query editor v2, all the Redshift data warehouses, both serverless and provisioned clusters, are listed on the console. Select the dots beside the cluster name and click Create connection:
Figure 1.6 – Creating a connection in query editor v2

Figure 1.6 – Creating a connection in query editor v2

  1. In the connection window, select Other ways to connect, and then select AWS Secrets Manager:
Figure 1.7 – Connection options in query  editor v2

Figure 1.7 – Connection options in query editor v2

  1. In the Secret section, click on Choose a secret, select the correct secret, and click on Create connection.
  2. Now that you have successfully connected to the Redshift database, type the following query in the query editor:
    SELECT current_user;
    
  3. Then you can click on Run to execute the query.

The results of the query will appear in the Query Results section. You are now connected to the Amazon Redshift data warehouse and ready to execute more queries.

Visually different images
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
You have been reading a chapter from
Amazon Redshift Cookbook - Second Edition
Published in: Apr 2025
Publisher: Packt
ISBN-13: 9781836206910
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Modal Close icon
Modal Close icon