SELECT or WITH SQL query against a supported connection.
Open Data explorer
In Mage Pro, select Data explorer from the sidebar, or open Apps and select Data explorer. The page is available at:Supported connections
Data explorer lists existing connections from:io_config.yamlSQL provider profiles.- Saved data integration source configs.
- Saved data integration destination configs.
io_config.yaml SQL profiles, Data explorer can browse metadata without
loading the full warehouse inventory in the initial connection list. It lazily loads
catalogs or databases, schemas, tables, and columns as each level is selected. When
metadata loads, the browser selects the first available catalog or database, schema,
and table by default, loads columns for the selected table, and keeps the selected
items highlighted. The metadata browser includes its own refresh control for the
selected connection. Schema browsing is currently supported for DuckDB, Microsoft
Fabric, MySQL, PostgreSQL, Redshift, Snowflake, SQLite, and Microsoft SQL Server IO
config profiles. Other SQL-capable IO config profiles can still preview or query data
when their connection settings are complete, but you must type the table name or SQL
query manually.
Viewers can open Data explorer and review the connection inventory. Editor access is
required to preview a table or run SQL. Saved source and destination configs follow
the permissions of the pipeline that owns the config: users only see integration
configs from pipelines they can view, and they must be able to edit the owning
pipeline before running a preview or SQL query through that config.
Preview a table or stream
- Select a connection from All connections, IO configs, Sources, or Destinations.
- For
io_config.yamlconnections with metadata support, use the schema browser to confirm or change the selected catalog or database, schema, and table. The first available table is selected by default, and selecting another table fills the preview target and the starter SQL query. - For saved source or destination configs, choose a table or stream when options are
available. The selected value becomes the preview target and the starter
SELECT * FROM <table_or_stream>SQL query. - If the connection does not provide table options, or the schema browser does not load a matching table, type the table name.
- Set a row limit.
- Click Preview table.
SELECT * FROM <table> query.
Run a SQL query
- Select a SQL-capable connection.
- Enter one
SELECTorWITHquery. - Set a row limit.
- Click Run query.
SELECT or WITH statement at a time. Mutating statements
such as INSERT, UPDATE, DELETE, DROP, locking clauses such as FOR UPDATE or
FOR SHARE, and multi-statement SQL are rejected. Data explorer also rejects
SELECT or WITH queries that call known unsafe functions with side effects, such as
functions that update sequences, terminate sessions, sleep, read server-local files,
or execute provider-specific system commands. The server also clamps row limits to
protect the workspace from accidentally large previews.
These safeguards are not the same as database-enforced read-only execution for every
provider. PostgreSQL and Redshift preview and query execution start a database
read-only transaction before running the query and roll it back afterward. Metadata
browsing uses server-generated SELECT queries with provider timeout settings.
Metadata discovery, preview, and query execution are also bounded by server-side
deadlines. For providers with native timeout controls, Data explorer passes those
settings to the driver or query job. If a provider call exceeds the relevant deadline,
Data explorer attempts provider-native cancellation where available, closes or stops
the bounded execution operation, and returns a timeout error. Other supported
providers rely on statement validation, restricted-function checks, provider timeout
or lock-timeout settings where available, bounded server execution deadlines, and
row-limit enforcement.
For those providers, use credentials that already have the least privileges needed
for exploration.
Review results
After a preview or query succeeds, Data explorer shows the returned rows in a table. Use the column headers to sort the returned rows, or open a column filter to narrow the rows shown in the current result. These sort and filter controls apply only to the returned sample. To filter the full source table, add the filter to the SQL query. Returned row counts describe the loaded preview window, not the total number of rows in the source table. To answer full-table cardinality questions, run an exactCOUNT(*) query against the selected table or filtered query.
When a tabular result is available, click Expand results to hide the connection,
schema, and query browser and give the results table more space. Click ← Back
to restore the explorer panels. Data explorer remembers this layout
preference for future result tables.
API
The UI uses thedata_explorations API resource.
GET /api/data_explorations returns each connection with fields such as uuid,
label, kind, provider, profile, pipeline_uuid, block_uuid, supports_sql,
supports_preview, supports_metadata, table_options, and redacted metadata.
To browse schema metadata for a supported IO config connection, send a nested
data_exploration payload with action_type: "metadata":
metadata_type values of databases, schemas, tables,
or columns. Table metadata requires schema; column metadata requires both
schema and table. The optional database field is used by providers that need a
catalog or database qualifier, such as Snowflake. Metadata limits are clamped
separately from preview and query row limits.
To preview or query data, send a nested data_exploration payload:
success, columns, rows, metadata, and error_message.
For query responses, metadata.returned_row_count is the number of rows returned
in the preview window, metadata.preview_limit_reached indicates whether the
window reached the requested limit, and metadata.row_count can be null when
the API did not run an exact count. Treat metadata.row_count as full-result
cardinality only when metadata.row_count_mode reports that an exact or estimated
count is available.
Connection metadata and error messages are redacted so credentials are not exposed in
the response.