Amazon Redshift SQL Notebooks
Amazon Redshift is introducing SQL Notebooks for data platform SQL developers.
SQL Notebooks can be used to organize your queries by grouping related SQL queries in a single SQL Notebook document, adding explanations for each SQL query by using Markdown cells.
SQL notebooks can be shared to team members.
To start working with SQL Notebooks for your Amazon Redshift database SQL developments,
Launch AWS Management Console
Go to Amazon Redshift Dashboard
On the left menu, you will see Query editor v2
Connect to a database from the target Amazon Redshift cluster
On Amazon Redshift Query Editor screen, click on "+" (Plus) sign and select "Notebook" to create a new SQL Notebook to run on target Redshift database
When a SQL Notebook is created, it is displayed as follows
First you can rename your SQL Notebook by pressing the "Rename" button on the right side of the Notebook
By using "Add markdown" buttons, first add a descriptive information about the SQL Notebook and its content
Then add your SQL queries and your comments on each SQL query by using "Add SQL" and "Add markdown" buttons which will add new SQL Query and text sections within the SQL Notebook
It is possible to run SQL queries on the database attached and add comments on the output using markdown cells.
After you complete your developments on the SQL Notebook, close the notebook by pressing the "x" icon displayed on the SQL Editor tab
Now you can organize your SQL Notebooks by creating a folder structure which is meaningful for you and share your SQL Notebooks with your team mates
On Query Editor v2, you will see "Notebooks" side menu on the left. If you click on the Notebooks icon, it will display a content like below where you can execute basic actions regarding notebook files and organizing them in a folder structure.
As you can see, you can create new folders based on your requirements by pressing the "New folder" button and renaming accordingly.
It is also possible to change the color of folders containing SQL Notebooks
By drag and drop operations you can move a SQL Notebook into a new folder
You can move a notebook file back to parent folder too.
A SQL Notebook can be shared with other developers by a right-click on the notebook and then choosing the "Share with my team" menu option
As for all AWS resources, it is also possible to assign and edit resource tags for your Amazon Redshift SQL Notebooks