Vaibhav Sharma
Vaibhav Sharma

Reputation: 1742

Formatting (Indentation) of SQL Query in Snowflake SQL Editor

Do anybody knows the way or short cut keys to format any long SQL query written in Snowflake editor. I have gone through the whole Snowflake documentation, but couldn't find any.

Upvotes: 2

Views: 19338

Answers (2)

Rick
Rick

Reputation: 369

There is a Format Query option from the Kebab menu (three vertical dots) on a worksheet tab in Snowsight (Snowflake SQL Editor).

From Format your queries:

When a worksheet is open, you can select the name of the worksheet to format the queries in your worksheet, and view the keyboard shortcuts.

  1. Sign in to Snowsight.
  2. Select Projects » Worksheets to open the list of worksheets.
  3. Open a worksheet.
  4. Hover over the tab for the worksheet and select more actions for worksheet.
  5. In the drop-down list, select Format query to format the query text for readability.

Upvotes: 2

Hans Henrik Eriksen
Hans Henrik Eriksen

Reputation: 2860

In the Snowflake Web GUI, there are only some basic keyboard shortcuts (-> Documentation):
TAB and Ctrl-[ + Ctrl-] to indent/outdent parens levels.

Also navigation and search/replace.
But no complete expression formatting, alas.

We can only hope for the Numeracy acquisition to give us a fuller database web client, eventually.

Upvotes: 8

Related Questions