Power User's Cheat Sheet

Keyboard Shortcuts

When a text input does not have focus SHIFT+? opens the keyboard shortcut menu.

When you are in the Query Editor,
⌘+Enter will run the current query and ⌘+/ will comment out the current line of SQL.

Advanced Search

The Table List and Warehouse search boxes support advanced search.

Search InputWhat happens
userThe default behavior. Searches schemas, tables, and columns for "user"
s: userSearches schemas for "user"
t: userSearches tables for "user"
c: userSearches columns for "user"

Sample Data

Hovering your mouse over a column in the Table Details pane will show you a brief sample of unique values in a column.

Run Selected

Selecting a fraction of a query will run and clicking Run Selected will run the selected text. This is very useful for debugging complex queries. You can also comment out useful snippets in the query window and then select them when you want to reference their queried results.

Copy Buttons

Tables and columns have useful buttons on them that generate queries for you and copy their values to your copy buffer.

Resizing Window Panes

You can resize all of the panes on query pages to fit your needs by dragging the dividers between the panes.

Query URLs

Every time you successfully run a query on the query page it updates the browser URL with the latest query. Email URLs to coworkers, bookmark them, paste them wherever.

Save As Transform

Turn an ad-hoc query into a transform with one button click.

Take advantage of transform descriptions

Treat the first line of the transform description like a title or a heading. In many cases, Mozart will only show the first line of the description. Use the rest of the description to journal changes or explain complex reasoning.

Run Results Advanced Options

Tools for making the Run Results easier to read.

SaaS tools frequently create tables with 20 or more columns many of which are entirely full of null values. When this happens the Hide Empty Columns checkbox is particularly useful.

Add a User Defined Function(UDF) to help with writing transforms

  1. Open Snowflake
  2. Paste a function in the query editor
    create or replace function add5 (n number)
    returns number
    as 'n + 5';
    
  3. Optionally, you can set the context to a specific schema by clicking on a schema in the left hand column. By default functions go into the schema PUBLIC.
  4. Click Run.
  1. Go back to Mozart's query editor and run the function select mozart.add5(3)
  2. See https://docs.snowflake.com/en/sql-reference/udf-overview.html for more help.

Install a snippet plugin in your browser

You will probably find yourself typing certain queries such as SELECT * FROM schema.table WHERE column > 10 over and over again. If you would rather type something short like /where instead of a whole query you can install a browser snippet program such as Blaze.


Did this page help you?