Skip to main content

SQL Editor

Start a worksheet​

Open the SQL editor, select your connection, and create an editor tab. Use the catalog browser to discover accessible objects. Check the catalog, schema, and warehouse context before running SQL that changes data.

Run a statement or script​

Use Run for the current query or selection. Use Run All to execute the statements in the tab in order. For a tutorial, run setup before the statements that use its objects.

The continue on error option lets a batch continue after individual SQL errors; authentication, session, or network failures can still stop it. Leave this option off when later statements depend on earlier changes. Run All does not make an entire script one transaction; use the transaction semantics appropriate to your workflow.

Use Cancel to request cancellation of a running query. If a write is interrupted or a connection drops, inspect query history and the target state before retrying it.

Read the results​

For a script, inspect the result for each statement, including errors, returned values, affected rows, and metadata. A successful CREATE MODEL or CREATE INDEX acknowledgement does not establish prediction quality or prove that a later query used the object.

Compare a tutorial's output with its expected values. Counts can vary when an object already existed; for metadata lists, locate the qualified object name instead of relying on the total number of rows.

Explain and history​

Explain invokes Explain Analyze for the current query; it can execute the query while collecting runtime information. Use it intentionally, particularly with expensive workloads. Query History helps you find earlier SQL, durations, statuses, and error details.

Save your work​

Use Save to create or update a saved query you own. Use Save As… to create a separate copy, including when adapting a shared tutorial. A saved query stores reusable SQL; its target tables and permissions are managed separately.

See saved queries and shared tutorials for folders and sharing.