Skip to main content

SQL Query Editor

The SQL Query Editor lets you run queries directly against your connected data sources without leaving Qarion. Combined with catalog-aware autocompletion and PII masking, it provides a governed query experience.

Opening the Query Editor

Navigate to the Query Editor from any space's side navigation. The editor opens with a blank tab and your space's queryable connectors available in the connector selector.

You can also open a pre-populated editor from any product page by clicking Query this Table, which fills in a SELECT * starter query targeting that product's source table.

Writing and Running Queries

Selecting a Connector

Choose a connector from the dropdown at the top of the editor. Only connectors that support SQL execution appear here — this includes database connectors like PostgreSQL, Snowflake, BigQuery, MySQL, and Databricks.

SQL Autocompletion

The editor provides context-aware autocompletion powered by your catalog metadata:

  • Table names — suggested after FROM, JOIN, and similar keywords
  • Column names — suggested when the cursor is inside a column list or WHERE clause, scoped to the tables in your query
  • SQL functions — dialect-specific functions (SUM, AVG, COALESCE, etc.) suggested in expression positions

Executing a Query

Click Run (or press Ctrl+Enter / Cmd+Enter) to execute your SQL. Results appear in a grid below the editor with:

  • Column names and inferred types
  • Row count and execution time
  • Pagination for large result sets

Only SELECT statements are allowed. DML statements (INSERT, UPDATE, DELETE) and DDL statements are blocked by the execution service.

Row Limit

Query results are capped at a configurable row limit (default: 500 rows). This prevents accidental full-table scans from overloading the source system.

PII & PHI Masking

Columns flagged as PII or PHI in the catalog are automatically masked in query results unless the user has been granted explicit PII/PHI access through a product role. See PII/PHI Access Controls for details on how access is managed.

When masking is applied, sensitive column values are replaced with ***MASKED*** in the result grid and in exports.

Exporting Results

Click Export to download query results in CSV or JSON format. Exports respect PII masking — masked columns remain masked in the exported file. The export row limit is capped at 2,000 rows.

Tabs and Drafts

The editor supports multiple tabs, each with its own SQL text, connector selection, and results. Tabs are automatically persisted to the server so your work is preserved across browser sessions and devices.

  • New Tab — Click the + button to open another tab
  • Close Tab — Click the × on any tab to close it
  • Auto-save — Tab state is synced to the server and to local storage as a fallback

Saved Queries

Saving a Query

Click Save to save the current query with a title. Saved queries are associated with a specific connector and space.

Sharing Queries

When saving, toggle Shared to make the query visible to all space members. Unshared (personal) queries are only visible to you.

Managing Saved Queries

The Saved Queries panel lists all your personal queries and shared queries in the space. From here you can:

  • Load a saved query into a tab
  • Edit the title, SQL, or sharing setting (owner only)
  • Delete a saved query (owner only)

Query History

Every query execution is recorded with:

  • SQL text
  • Row count and execution time
  • Success or failure status
  • Error message (if failed)
  • Timestamp

Access your history from the History panel in the query editor. Space administrators can view all users' query history from the admin history view.

Troubleshooting

"Connector not queryable" — The selected connector does not support SQL execution. Only database connectors (PostgreSQL, Snowflake, BigQuery, MySQL, Databricks) can be used for queries.

"Query references uncataloged tables" — The query references tables that are not registered as products in the space. Register the table in the catalog or verify the table name matches the product's hosting location.

"Rate limit exceeded" — You have exceeded the query rate limit. Wait a moment and try again.