Power User's Cheat Sheet

Shortcuts, tips and tricks to help you navigate and better utilize Mozart.

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 Input What happens
user The default behavior. Searches schemas, tables, and columns for "user"
s: user Searches schemas for "user"
t: user Searches tables for "user"
c: user Searches columns for "user"

Advanced Search 2

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.

Table List Buttons

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

table list buttons

Column list buttons

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.

Query Distinct Column Values

Hovering your mouse over a column in the Table Details pane will give you a button that will query all distinct values in a column.

Query distinct values

Double-Click Table Name to see Table Details

Double-clicking a table name in the editor will show the table details in the right hand column.
Click table name for detail

Resizing Window Panes

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

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.Query URL

Save As Transform

Turn an ad-hoc query into a transform with one button click. Click the dropdown arrow next to the Run button while on a query page.

Save query as transform

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.

On the Warehouse page, the first line of the table description shows by default. The entire description shows on hover.

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.

Advanced Options for results

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

  1. While logged into Mozart Data, 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'.
  5. Go back to Mozart's query editor and run the function 
    select mozart.add5(3)
  6. 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.