- [Sohaib] Hi, my name is Sohaib Katariwala,
and I am an analytics specialist solution architect
with AWS.
Today, I'll be showing you some of the new features
that are now available
in the Amazon Redshift Query Editor v2.
As a reminder,
you can open the Redshift Query Editor v2
from the Amazon Redshift console
by clicking Query with query editor v2.
Now we have the query editor opened,
and we have a sample query written in the editor.
The first thing I will show you is the built-in shortcuts
in the query editor to make it easier
and quicker to do certain things.
I'll click on the shortcuts menu,
and here I can see a list of all the available shortcuts.
Next to the name of the shortcut,
I can see the actual keyboard shortcut,
which is first displayed
in the Windows keyboard followed by the Mac.
So for Windows you have Control,
and then for Mac you have Command.
And then for Windows you have Alt,
and on the Mac you have the Option button.
Some of the common ones are undo and redo
which is Control + Z and Control + Y.
To run a query, use Control + Enter.
To save a query, it's Control + S.
To format a selected query,
you use Control + ; or Command + ; for Mac.
Let me show you that.
And to uncomment or comment, I use Control + /,
and I can show you an example of doing that.
To search for a certain word,
I use Control + F or Command+ F.
And I can also then replace it.
To decrease or increase the indentation of a line,
I use Control + opening square bracket
and closing square bracket, respectively.
To move a specific line down or up,
I use the Alt + down and up buttons,
or Option + down and up on the Mac.
And here is an example of doing that.
The next new feature we will discuss
is the ability to collapse and expand sections
of your code right in the editor.
Here, we can click on the arrows
next to the section in the query,
and click to collapse and click to expand the section.
This makes it easier to navigate a large long query
and be able to minimize certain sections
that you're not working on at a time.
The next new item is bracket highlighting.
You can see that the brackets, or parentheses,
are matching colors for a pair
and are different colors for different pairs
and different levels when they are nested.
You can see that this pair is yellow,
and the other ones in the other layers are blue and purple.
When I click on one of these brackets,
whether it's a closing one or the opening one,
the corresponding one is highlighted automatically,
making it easier for me to find it.
When I click on a bracket,
I can also see a line that guides me to the location
of the corresponding bracket
when it happens to be on a different line
so that makes it easier for me to navigate up and down
and find the corresponding bracket.
Next, I'll show you error highlighting
for things like syntax errors.
So I have a query here that has an error,
so I'm going to run it and see what the error message is.
The error message tells me
that there is a syntax issue near a comma.
So now, typically I would have to scroll through this query
and find which comma it's referring to.
Instead of having to look for which line
in my query has the comma that could be causing this issue,
the query editor has already highlighted the line
in my query which causes this error.
This makes it much easier and faster for me
to identify the issue
and resolve the syntax error in my query.
That covers some of the new features that are now available
in the Amazon Redshift Query Editor v2.
Thank you so much for watching.