Skip to main content

Running Queries

Before running anything, you need to point your worksheet at the right compute cluster and database. Once that's set, you can write and execute SQL.

Selecting a Compute

Click the compute selector dropdown in the toolbar and choose a running compute cluster. Your selection saves to the worksheet automatically.

Selecting a Catalog and Database

Click the catalog dropdown in the toolbar, then choose a namespace from the database dropdown (which activates after you pick a catalog). Both selections persist as catalog.database on the worksheet. Each dropdown has a Refresh button if you need to reload options. If a previously selected catalog or namespace no longer exists, the dropdown shows an error indicator.

Worksheet toolbar showing compute selector, catalog and database dropdowns | IOMETEWorksheet toolbar showing compute selector, catalog and database dropdowns | IOMETE

Writing Queries

The code editor autocompletes SQL keywords, functions, table and column names from your selected catalog, and query variables. It also recognizes table aliases (e.g., typing e after employees as e). Press Cmd+Space (Mac) or Ctrl+Space (Windows/Linux) to trigger suggestions manually.

Your SQL auto-saves after a 2-second pause. Press Cmd+S / Ctrl+S to save immediately, or navigate away.

Code editor with SQL syntax highlighting and autocomplete | IOMETECode editor with SQL syntax highlighting and autocomplete | IOMETE

Using Query Variables

Variables let you parameterize queries using {{variableName}} syntax. At runtime, each variable is replaced with its assigned value, so you can reuse the same query with different inputs.

Adding a variable: Click Toggle Variables in the toolbar to reveal the variables bar, then click +. In the Add variable modal, enter a unique Name, choose a Type (Text, Dropdown, or Date in YYYY-MM-DD format), and set a Value. Click Add.

Editing a variable: Click an existing variable tag in the bar. The modal opens pre-filled with the current values (the name is read-only). Update the fields and click Save.

Deleting a variable: Click the X icon on a variable tag.

Add variable modal with Name, Type, and Date value fields | IOMETEAdd variable modal with Name, Type, and Date value fields | IOMETE

Running a Query

Select a single SQL statement in the editor, then click the Run button (green play icon) or press Cmd+Enter / Ctrl+Enter. Only one statement runs at a time; multiple selections aren't supported.

Code editor with a selected SQL statement and Cmd+Enter shortcut tooltip | IOMETECode editor with a selected SQL statement and Cmd+Enter shortcut tooltip | IOMETE

If something isn't ready, the editor displays a message instead of executing:

ConditionError Message
Another query is already running"Query in progress. Please wait for it to complete"
No compute selected or compute not active"Please select an active compute"
Compute is still starting"Please wait for the compute to be active"
No catalog/namespace selected"Please select a catalog or namespace"
No statement selected in editor"Please select statement to run"
Multiple selections made"Multiple selections aren't supported right now"

Cancelling a Query

While a query runs, a Cancel button appears in the results panel. Click it to stop execution, and the state transitions from RUNNING through CANCELLING to CANCELLED.

Results panel showing query executing status with elapsed time and Cancel button | IOMETEResults panel showing query executing status with elapsed time and Cancel button | IOMETE

Understanding Query States

StateDescription
RUNNINGExecuting. The run button shows a spinner, and Cancel is available.
COMPLETEDFinished successfully. Results appear in the Data, Chart, and SQL views.
CANCELLINGA cancel request is being processed.
CANCELLEDYou cancelled the query.
FAILEDExecution failed. An error message and a Compute Logs link appear.
NOT_FOUNDThe result wasn't found (it may have been cleaned up).
RESULT_EXPIREDThe result expired and is no longer available.

Status updates arrive in real time, so you'll see state changes without refreshing.