In the following video, let’s learn how to work with Redshift SQL.
Some key points from this video are summarised below.
- While creating a table, the schema name should be placed before the name of the table; otherwise, the table will be created in the public schema, as shown in the video provided above.
- When inserting data into a table, ensure that the schema name is correct; otherwise, you will get an error. Or, if you forget to add the schema name, then the table may present the public schema and the data inserted into that table.
In this segment, you learnt about the steps for executing some basic Redshift SQL queries. You also learnt how to create a table.
As you are already aware of SQL queries, in this module, we will focus on the concepts related to querying in Redshift.
In the next segment, our SME will share some best practices for designing tables in Redshift. These practices will help you write optimal Redshift SQL queries.
Note:
Redshift stores the details related to the database schema in a system table named information_schema.
Important Note:
Amazon Redshift is a costly service of AWS. Hence, to avoid burning up your monthly AWS budget, please make sure to Pause your Redshift cluster during the module week(when you’re learning/practising Redshift. However, you can also choose to terminate it if there is any kind of break while you are going through the module). And make sure to terminate it once you are done with the module.
Please note that clicking on the Stop button in AWS Academy dashboard does not affect the Redshift cluster and therefore, the cluster has to be terminated from inside the AWS management console page.
Additional Reading
Supported data types in Redshift