Exploring Data with SQL
The Data Explorer is a browser-based data exploration tool that lets you write and run SQL queries against your model’s data.

How to Access the Data Explorer
You can open the Data Explorer from three places in the pd4castr UI:
-
From the forecast dashboard — in the options sidebar, hover over a run datetime and click the folder-and-magnifying-glass icon next to it to open the Data Explorer in a new tab, with that model run’s input, output, and dataset data pre-loaded
-
From the performance metrics page — click the Explore Data link to open the Data Explorer with historical forecast output that was used to calculate the metrics pre-loaded
-
From a model run view — click the Explore Data link below a view’s result to open the Data Explorer with exactly the tables that view references pre-loaded, and the view’s SQL query pre-filled in the editor with the parameter values the result ran with
Writing and Running Queries
Queries run in DuckDB in your browser, so use DuckDB’s SQL dialect and functions. The editor opens with a working starter query for the data you loaded — for a model run view, that is the view’s own SQL, ready to run and tweak.
To run a query:
- Write your SQL in the editor.
- Click the play button in the bottom-right corner of the editor. Alternatively, select a portion of text to run only that selection.
- Results appear in the table view below.
If the view has parameters, the editor lists their values at the top as
commented-out SET VARIABLE lines, and the query reads them with
getvariable(). To try a different value, uncomment a line, edit it, and run
it.
You’re working on a copy of the data. Creating tables or updating rows only affects your session, and nothing changes on the platform.
To compare a sensitivity with the base run, join the two output tables on
forecast_datetime:
select
b.forecast_datetime,
b.series_a as base,
s.series_a as high_case
from output b
join output_high_case__plus_10_ s using (forecast_datetime)
order by 1Exploring Results Without SQL
You don’t have to write SQL to use the Data Explorer. Press the play button to run the starter query, then use the Datagrid panel on the right of the results grid — its Group By, Split By, Order By, Where, and Columns fields group, split, sort, filter, and pick columns without touching the editor.
Viewing Results
Query results render in an interactive table view that also supports clicking a column header to sort by it.
If a query fails, the error comes back as a result: one row with a single
error column holding the error message.
Dates and timestamps are shown in UTC, in ISO format with a trailing Z (for
example 2026-09-02T00:00:00.000Z). The forecast chart shows the model’s
display timezone instead, so the same forecast can look hours apart in the two
places. To see times as the chart shows them, convert the column in your query:
select forecast_datetime::timestamp at time zone 'UTC' at time zone 'Australia/Brisbane' as local_time
from outputUse the model’s display timezone in place of Australia/Brisbane. The result
table still adds a Z to the converted value, even though it’s now local time.
Two columns with the same name in one result make the query fail with an error about duplicate entries, so give every column a unique name.
Exporting Results
The toolbar above the results grid has an export icon (an arrow leaving a box) and a copy icon (two stacked squares) next to it.
Clicking the export icon opens a menu with a file name field and a format list: CSV, JSON, Arrow, and HTML for the results currently in the grid, plus CSV, JSON, and Arrow for the full, unfiltered data behind it. Picking one downloads a file in that format. The copy icon opens the same choice of CSV or JSON, for the current or full results, and copies it to the clipboard instead of downloading it.
This only exports what’s in the results grid, one query at a time. To pull data out in bulk, use the Python SDK or the REST API instead.
Available Data
The tables you get depend on where you opened the Data Explorer.
From a run datetime on the forecast dashboard, you get the latest completed run at that time: its output, its inputs, and the model’s datasets. If the model has sensitivities, their runs at that datetime are loaded too. Failed runs aren’t included.
From a model run view, you get only the tables the view’s query uses.
From the performance metrics page, you get a model table with the model’s
historical output, and a comparison_model_<ref> table for each model it’s
compared against.
Table Names
Run SHOW TABLES to see what’s loaded. Tables are named the same way as in
views:
| Data | Table |
|---|---|
| Output | output |
| Input | input_<key> |
| Dataset | dataset_<key> |
| Sensitivity output | output_<sensitivity name> |
| Sensitivity input | input_<sensitivity name>_<key> |
Keys and names are lowercased. + becomes _plus_, - becomes _minus_, and
any other character that isn’t a letter, number or underscore becomes _. An
input with the key raw-data is input_raw_minus_data, and a sensitivity
called “High case +10%” is output_high_case__plus_10_.
If you open the Data Explorer with more than one axis value selected, each
variant with a completed run gets its own tables with its axis values in the
name, such as output_scenario_high or input_scenario_high_raw_minus_data.
There’s no plain output table in that case.
Next Steps
To learn about monitoring model runs and debugging failures, see Author Tools.