How Explore Works¶
Explore runs your SQL once and then hands you its rows a page at a time, so you can scroll through a large result without running the query again. This page explains what happens during a run, how rows load, what the row counts mean, how a run can end, the limits that apply to every result, and the checks that keep every query read-only.
What a Run Is¶
When you click Run, Explore checks the query, sends it to the datastore (or, in Qualytics mode, runs it in Qualytics with Spark SQL), and keeps the rows it returns as a result. Everything you do with those rows afterward reads from that result:
- Scrolling reads the next rows from the result. It never runs the query again.
- Downloading the whole result as CSV reads every row from the result. It does not run the query again either.
- Charting uses the rows already loaded in the grid.
A new run in the same workspace replaces the previous result. Running the query again is the only way to see changes made to the data since the last run. Revealing masked values also runs the query again, this time with the values shown.
A result belongs to the person who ran it. Nobody else can read it, Admins included.
How Rows Load¶
The first rows appear as soon as the query returns them:
- The first page holds 100 rows. While the query has not returned them yet, the results card shows Running with the elapsed time, and a stop button.
- Scrolling near the end of the grid loads more, up to 1,000 rows at a time. The query keeps producing rows ahead of what you have read, up to a bounded amount, and then waits until you read further.
- The end of the result shows End of results below the last row.
The query details, opened from the row count above the grid, show when the run started, how long it took, the rows and columns it returned, and the SQL that ran. See Results.
Row Counts¶
The row count above the grid tells you how much of the result you have loaded and whether the total is known yet.
| Label | Meaning |
|---|---|
N rows |
Every row of the result is loaded. |
Showing X of N rows |
The run has finished, so its total is known, and more rows load as you scroll. |
Showing N rows, more to load |
More rows load as you scroll, and the query has not finished, so the total is not known yet. |
(stopped at the size limit) |
Added to the count whenever the result ended as partial, before the query's last row. The label reads the same whatever the cause, which can also be the most rows your deployment holds at once, the run's row cap, or a read that broke off. See How a Run Ends. |
First 100 rows |
On the Explore tab of a table or file, the read showed its first 100 rows and loads no more. |
When the results card is narrow, the same counts appear in a shorter form, such as 2.5M rows, 100 of 2.5K, or 100+ rows.
How a Run Ends¶
Every run ends in one of five ways. The History of a workspace and the History page group them into three outcomes: Succeeded, Failed, and Stopped.
| End | What happened | What you see |
|---|---|---|
| Completed | The query returned every row. | The full row count, and End of results once you scroll to the last row. |
| Partial | The result stopped before the query's last row. This happens when the result reaches its size limit, when a query read in Qualytics reaches the most rows your deployment holds at once, when a run started through the API reaches the row cap it set (max_rows), or when a query held open on the datastore can no longer be read after its first rows arrived. |
The rows read before the stop stay, and the count shows (stopped at the size limit), whatever the cause. |
| Failed | The query was refused by the checks, the datastore returned an error, or the run passed its time limit. A run that fails after its first rows arrived keeps those rows. | The query failed with the error message, a Copy error button, and Fix with AgentQ when the Explore Assistant is available. When the query reads masked fields, the datastore's own message is hidden, because it could quote masked values. |
| Stopped | You clicked Stop, or ran the workspace again while a run was still going. | Query stopped, with a prompt to run the query again to see its rows. |
| Expired | The result was closed while you still had rows to read. | Reading more rows says the result expired and asks you to run the query again. |
A result expires when nobody reads it for 30 minutes, when it is closed to make room for a newer result of yours (see Limits), or when Qualytics restarts. A result also closes when a field it shows is masked after the run, or when you lose the permission to reveal the values it shows. In each case, run the query again to read its rows.
Limits¶
| Limit | Value | What happens when it is reached |
|---|---|---|
| Size of one result | 2 GB by default. Your deployment may set a different size. | The result ends as partial, with the rows read so far. |
| Open results per user | 3 | Opening a fourth result closes the one you read least recently. The result you are opening is never the one closed. |
| Open results per deployment | 100 by default. Your deployment may set a different number. | A new run is refused until a result closes or expires. |
| Time without a read | 30 minutes | The result expires. |
| Query text | 1,000,000 characters | The query cannot be saved or run. |
| Rows per read | 100 for the first page, then up to 1,000 at a time | Reads continue as you scroll. |
| Row cap of a run started through the API | None unless the run sets max_rows, from 1 to 1,000 |
The query stops at that many rows, and the result ends as partial. |
| Run history | 90 days | Older runs leave the History of a workspace and the History page. Deleting a datastore removes the runs made on it at once. |
| Time to run | The time limit your deployment sets for operations, 3 hours by default | The run fails with The query ran past its N second timeout. |
A run in Explore has the same time limit as the operations on your deployment. Use Stop to end a run you no longer want to wait for.
An open result on the Explore tab of a table or file, one that loads more rows as you scroll, counts toward your three open results too.
Which Reads Load More Rows as You Scroll¶
Queries in a workspace always load more rows as you scroll, whatever the datastore. How the rows are produced depends on the SQL mode:
- In the datastore's mode, the query runs on the datastore and stays open while you read its rows.
- In Qualytics mode, Qualytics first reads each table or file the query names in full, then runs the query over them. A query over large tables or files therefore takes longer to return its first rows. See SQL Modes.
The Explore tab of a table or file shows the first 100 rows, then loads more as you scroll for these sources:
- Tables and views of JDBC datastores.
- Plain files of DFS datastores, such as CSV, JSON, and Parquet files. Excel files are the exception.
- Delta and Iceberg tables on DFS datastores. Delta tables return their newest partitions first.
- Hive, Glue, and Unity tables of native datastores. Partitioned tables return their newest partitions first.
- MongoDB collections.
- Salesforce objects that Salesforce can order by record ID.
Every other read shows the first 100 rows only, and the count reads First 100 rows. This includes computed files, computed joins, tables with computed fields that use window or aggregate functions, and reads with a filter or custom column that cannot be split into pages, such as a filter with a random function. See Datastore and Container Tabs.
Row Order¶
Rows come back in the order the query returns them. A query without ORDER BY has no guaranteed order, so two runs of the same query can list the same rows differently. Add ORDER BY to the query when the order matters.
Clicking a column header in the grid sorts only the rows already loaded, not the whole result. To sort the whole result, add ORDER BY to the query and run it again.
Read-Only Queries¶
Explore only reads data. Before a query runs, Explore checks it and refuses anything that could change data or reach outside the datastores you can query:
- One query at a time. Two statements sent together are refused. A trailing semicolon is fine.
- Reads only. Statements that create, change, or delete data (such as
INSERT,UPDATE,DELETE, orSELECT ... INTO) are refused, even inside aWITHclause. - Your datastores only. The query may read only tables that Qualytics has synced in the datastores you can query. A table that Sync has not discovered yet, or a system table of the database, is refused until it is synced as part of a datastore.
- No functions that reach outside. Functions that run SQL from text, read server files, call other servers, read other sessions, settings, or secrets, or wait or take locks on purpose are refused. Where a table goes (in
FROM, or afterTABLE,LATERAL, orAPPLY), only a subquery or a function that turns its arguments into rows, such asgenerate_seriesorUNNEST, is allowed. - Read the same way as the database. SQL that the check and the database would read differently, such as a name written with Unicode escapes (
U&"...") or a comment inside a comment, is refused before anything else, because what the database would run cannot be checked.
When Explore refuses a query, it says why and what to change, for example to name a table instead of a schema. A syntax error names the line and column where the check stopped reading. A refused query is not recorded in the History. See SQL Modes for every message.
When the database itself reports that a table or column of your query does not exist, the error asks you to correct the SQL, not to sync the datastore: a name in SQL you wrote is most likely mistyped.
Explore sends your SQL exactly as you typed it. It does not fill in placeholders such as {{ name }}.
Who Can Do What¶
| Action | Who can |
|---|---|
| Open Explore and keep workspaces | Every user role. Saving a workspace on a datastore needs the Viewer team permission or higher on it. |
| Run SQL | The Author team permission or higher on every datastore the query reads. Admins can run SQL on every datastore. |
| Reveal masked values | The Editor team permission reveals every masked field. The Author team permission reveals only masked computed fields that you own. |
| Read a result | Only the person who ran it. |
| Review every user's runs on the History page | Admins. |
Masked fields come back as ***MASKED*** unless you reveal them, and every reveal is recorded in the masking audit log. See Permissions for the full matrix, and Field Masking for how fields are masked.
See Also¶
-
Workspaces
The saved, private places that hold each query, its datastore, and its last result.
-
SQL Modes
Running a query on the datastore in its own SQL, or in Qualytics with Spark SQL, and what each mode can read.
-
Query Editor
The editor's controls: the datastore, the SQL badge, autocomplete, running a statement or a selection, formatting, and saving a computed table or file.
-
Results
The results grid, row counts, query details, cell values, masked values, and downloads.
-
Charts
Bar, line, and scatter charts of the rows loaded so far, charts proposed by AgentQ, and their PNG and PDF downloads.
-
History
The runs of each workspace, and the History page where Admins review every query run.
-
Assets
The datastores, tables, and fields you can drag into your SQL, and why some of them stay locked.
-
Explore Assistant
The AgentQ chat beside each workspace that proposes queries and charts, and helps fix failed queries.
-
Datastore and Container Tabs
The Explore tab of a datastore, and the Explore tab of a table or file with its fields, filter, and custom columns.
-
Examples
Questions people answer with Explore, and the queries and settings that answer them.
-
Best Practices
Habits that keep queries fast, results trustworthy, and masked data protected.
-
Permissions
The user roles and team permissions behind running SQL, revealing masked values, and reviewing history.