Docs
Sign in

Query Editor

The Query Editor is a SQL workspace for your project's data. You pick a table from the schema tree, write or edit a query, run it, and read the results, all on one page. In the APEX Data sidebar this page is called Explore.

Screenshot to add: The Query Editor with the schema tree on the left, the SQL editor above the results grid, and the table detail panel on the right.

Without an open project the page says "No project selected. Choose a project from the sidebar."

The layout

The page has three panels.

PanelWhat it holds
Schema (left)Every zone and table in the project, plus buttons to refresh and import data
Editor and results (center)The SQL editor on top and the results below. Drag the thin bar between them to resize
Table detail (right)Slides in when you click a table, showing its columns, a sample, its snapshots and its stats

Run a query

  1. Pick a table

    In the schema tree, click a table. A starter query is written into the editor for you: SELECT * FROM "namespace"."table" LIMIT 100. The table's detail panel opens at the same time.

  2. Edit the SQL

    Change the query, or write your own from scratch. Queries can use any table in the project and can join across tables and zones.

  3. Run it

    Click Run, or press Ctrl+Enter. The button reads Running… while the query works.

  4. Read the results

    The grid appears below the editor. See Results.

Your query is remembered for each project, so it is still there when you come back.

Editor controls

ControlWhat it does
RunRuns the query. Ctrl+Enter does the same
SQL engineChooses what runs the query: Auto, DuckDB or Spark. An engine that is not available is greyed out with the reason, such as "Spark Connect not configured"
HistoryOpens your recent queries. Click one to put it back in the editor. With none it says "No history yet"

History keeps your last 20 queries for each project, in your browser.

Results

Before you run anything the panel says "Write a query and press Ctrl+Enter to run". After that it shows one of:

  • Running, while the query works.
  • An error, in red, with the message from the engine.
  • "Query returned no rows." when it succeeded with nothing to show.
  • A grid of results.

Above the grid, a line gives the row count and how long the query took, such as 1,200 rows · 0.4s.

  • Sort: click a column heading to sort by it, and click again to reverse. Sorting applies to the rows loaded.
  • Pages: 50 rows are shown at a time. Use Prev and Next, with a counter such as Page 2 / 24.

Export

The Export menu saves the results:

FormatNotes
CSVSaves the rows that are loaded in the grid
Parquet and JSONThe server re-runs the query and exports the full result. They are turned off until you have run a query in a project, with the hint "Run a query in a project first"

If an export fails, the menu shows the reason.

The schema tree

The left panel lists the project's zones in order: Landing first, then the others alphabetically (Documents, Refined and Intelligence). Landing starts open. Click a zone to open or close it. A zone with no tables says "No tables".

  • Click a table to put a starter query in the editor and open its detail panel. Hover for its name and its AI-written description, when it has one.
  • Vector Collections are listed at the bottom, with a count, when the project has any. See Vector Store.
  • With no tables at all, the tree says "No tables yet. Run a pipeline to populate landing zone."

Two buttons sit at the top of the panel:

ButtonWhat it does
↺ (Refresh schema)Reloads the list of tables, after a job or upload creates new ones
↑ ImportOpens Load data

The table detail panel

Click a table to open its panel at the right. A Query this table button writes SELECT * FROM "namespace"."table" LIMIT 100; into the editor and closes the panel.

The panel has five tabs:

TabWhat it shows
SchemaEach column's Field, Type and Req (whether it is required)
IntelligenceAn AI profile of the table: a description, notes on its columns and suggested questions
SampleA few rows from the table. "No sample rows" if it is empty
SnapshotsHow many snapshots the table has, and each one
StatsStatistics about the table

AI profile

The Intelligence tab shows a status: Profiling…, Not profiled yet, No AI key configured, Profile error, or the finished profile. Click Re-profile to generate descriptions again. "AI profile is running — check back in a moment." means one is in progress.

Load data

↑ Import opens Load data, a side panel for creating a table without leaving the page. It has three tabs.

TabUse it to
Upload fileDrop or browse for a CSV, Parquet, JSON or JSONL file
From Object StorePick a file from the project's storage bucket
SQL importWrite a CREATE TABLE ... AS SELECT ... statement yourself, for example one that reads a file with read_csv_auto

For the first two, enter a Table name and choose a Zone (Landing, Refined, Intelligence or Documents), then click Create table. It reads Creating… while it works.

For many files at once, use Bulk Upload.