Query data preview

Query Data Preview is the window that shows the rows a query returned, with the columns' types and the preview toolbar. It opens from the query editors of table popups and from View rows in the alert editor, so you can check a result before you save or act on it.

Where the preview opens

Run the query and the window opens on its own with the result; in the alert editor it opens when you click View rows. The window is read-only: it shows the result, and nothing you do in it changes your query or saves anything.

Read the result

Export the preview

  1. Pick the format in the export control: Excel, CSV, JSON or TSV. The format you pick becomes your default for later exports.
  2. Click the download icon next to the selector; its tooltip reads Download as and the format.

The download's name comes from the place you opened the window from. The default name is query_data; the alert editor exports its test rows as alert_test_rows, and some popups add the date and time (query_data_YYYY-MM-DD_HH-mm-ss).

Questions, answered

Why did a Query Data Preview window open by itself?

The query you ran in the popup finished, and the window opened to show you its result. Read the rows, then close the window; nothing you do in it changes your query.

Why does the window say no data preview available?

It has no result to show yet: that is the state before a run. It reads No data preview available, with "There is no query result to display yet. Run the query to see its data here." Run the query and the rows appear.

Why does it say "No data available" after a successful run?

The query ran and returned no rows. That still counts as a successful run, so the window shows No data available, with "This query executed successfully but did not return any rows." Change the query if you expected rows, then run it again.

How do I export the preview?

Pick the format in the export control (Excel, CSV, JSON or TSV), then click the download icon; its tooltip reads Download as and the format.

What is the exported file called?

It depends on where you opened the window. The default name is query_data, the alert editor exports its test rows as alert_test_rows, and some popups add the date and time, as in query_data_YYYY-MM-DD_HH-mm-ss.

Does the preview show how long the query took?

Where the result carries run statistics, the toolbar shows them: the elapsed time, the rows read and the bytes read. The Dictionary preview does not show run statistics.

Can I sort, filter or search the preview?

Yes. Use the search box, sort and filter from the column menus, show or hide columns, and page through the rows, as on other grids. The window stays read-only: nothing you do here edits the data.

Where do I see the rows an alert's Test returned?

Click View rows beside the verdict of a Test in the alert editor; the rows the test returned open in this window. The Test bar keeps the verdict, the row count, View rows and Preview email; see Create an alert.

Why did no preview open after I ran the query?

The run did not finish successfully, so there is no result to show. A failing query reports its error instead of opening the preview; read the message, fix the query and run it again. For the windows that help you fix a failing query, see AI query help: diff and fix.