Shortcuts, tips and tricks to help you navigate and better utilize Mozart.
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.
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"|
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.
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.
Double-Click Table Name to see Table Details
Resizing Window Panes
You can resize all of the panes on query pages to fit your needs by dragging the dividers between the panes.
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. Click the dropdown arrow next to the Run button while on a query page.
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.
Add a User Defined Function (UDF) to help with writing transforms
- While logged into Mozart Data, open Snowflake
- Paste a function in the query editor
create or replace function add5 (n number)
as 'n + 5';
- 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'.
- Click 'Run'.
- Go back to Mozart's query editor and run the function
- 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.