Run a query
Open SQL Editor in your workspace. In the action bar above the editor, choose a Catalog, Database, and Cluster you can use. Your workspace role needs permission to run SQL.- Click Run, or press
Cmd/Ctrl + Enter. - Stop a query: while it runs, the Run button becomes Cancel - click it (or press
Cmd/Ctrl + Esc).
If the selected cluster is suspended, you’re asked to confirm before it resumes.
Run one SQL statement
Paste these two statements into the same editor tab. They use sample values, so you can try them without a customer table:- Highlight the complete second statement and click Run. Under
sample_name, you should seecomparison. - Highlight both statements, click Run again and wait for both to finish. In the results pane, select the first statement to see
baseline. Select the second to seecomparison.
Set a default row limit
Setting a limit prevents accidentally running an unbounded query, which can drive up cost. Use the dropdown next to Run:
The Query Editor displays only the first 10,000 rows - see Working with large result sets for more.
Query status
As a query runs, its status moves through: Connecting → Planning → Executing → Fetching result → Success (or Failed on error).The results pane
The Results Pane appears below the editor after a run.- Single statement: a single results table, with a summary bar showing Execution Time, Row Count, and Query Status.
- Multiple statements: the pane splits into a query list (one row per statement, with status, query text, and row count) and a results view for the selected statement.
How do I find the result for a particular statement?
If you ran several statements together, click the row with the matching SQL in the query list below the editor. The results view shows the output for that statement. With one statement, the result appears directly. To find that run again, click Execution Time in its result header when shown. In Execution Details, copy Query ID. In Run History in the same workspace, choose a time range that includes your run. Open the Query ID filter, paste the ID and select Apply. Run History filters.Check an aggregate using four sample orders
In a fresh SQL Editor tab, choose your cluster, catalog and database. Run this statement. Each amount is in whole dollars.- paid: 2 orders, 20 dollars
- pending: 1 order, 7 dollars
- refunded: 1 order, 5 dollars
baseline or comparison, return to the tab where you ran the orders query.
Copy the Query ID from Execution Details. Run the same query again and copy the second Query ID. The totals should match and the IDs should differ. In Run History, filter by the first full ID and open the matching run. Check that its Query ID matches the first one you saved.
Execution details
Open a query’s execution details for a full breakdown: final status, the executed SQL, rows returned and wall time, an overview (Query ID, Run By, cluster name and size), and a Total Elapsed Time bar split into planning, queueing, and execution time, plus result fetching time by the client.Query execution plan
Click Show Execution Plan to open the Query Profile - a visual map of how the engine ran your query. Review the most expensive nodes and each step’s cost percentage, and use the zoom controls to navigate. Click Hide Execution Plan to return to the results.Results output
To copy one value, select its cell in the results table.How do I download a query result as a CSV?
A CSV is a text file you can open in a spreadsheet. Use Download CSV to save the rows loaded in the editor for one successful statement.-
Run this sample and wait for Success:
-
If you ran several statements, select the one containing
sample_idin the results pane. -
In the results header, choose the download icon labeled Download CSV. Open the file and check that it contains
42undersample_idandcheckedundersample_status. If the values differ, check the selected statement.
Working with large result sets
The browser displays up to 10,000 rows. A SQLLIMIT or the editor row limit can reduce that number further. To export more rows, first check the limit and filters in your SQL, then choose where you want the data:
- In your application: Use a supported connector to fetch the full result.
- In cloud object storage: Use
COPY INTO. To run it from Query Editor, you need the DataExport role and access to the storage destination.
Data preview
Data Preview returns the first 10 rows of a table or column for a quick look before you write a query. In the Schema Explorer, hover over a table or column, click the kebab (⋮), and select Data Preview - a new tab opens with the sample rows.Cross-catalog and cross-schema queries
You can combine data from different schemas and catalogs in a single query for a unified view of your data. Fully qualify each table with its catalog, schema, and table name:catalog_name is the name you gave the catalog when you created it in e6data. For Unity catalogs, it’s the catalog created under Unity in Databricks.
For a worked example, see Join orders and customers from two catalogs.
See also
- Query editor - the editor, tabs, and Schema Explorer.
- Find a query in Run History
- COPY INTO - unload large results to storage.