Skip to article
Browse documentation

Querying

SQL queries

Query accessible FrostTable tables with the supported SQL interface.

Open the SQL editor

Open SQL editor and select Managed workspace tables or an accessible external data source. The UI sends queries to the workspace SQL query endpoint. Queries are authorized against the workspace before execution.

Write a read query

The SQL service validates a single parsed query against an allowlist of read-oriented operations. The exact tables visible to a query depend on your workspace access.

SELECT order_number, total
FROM orders
WHERE total > 100
ORDER BY total DESC

Aggregations and grouping

SELECT customer_id, COUNT(*) AS order_count, SUM(total) AS order_total
FROM orders
GROUP BY customer_id
ORDER BY order_total DESC

Common filters, grouping, aggregate functions, sorting, and joins are accepted when they satisfy the SQL validator and resolve to accessible tables. An accepted syntax tree does not guarantee every Spark SQL expression or data-source operation is supported.

Results and pagination

Query results use bounded pages and cursors. The SQL API accepts a requested page size and returns the next cursor when more results are available. Configured page-size, offset, timeout, concurrency, and plan compute ceilings apply.

Compute and query limits

Managed query compute is measured in compute credits and reserved against the organization's subscription allowances. Plan-dependent concurrent query counts and durations are shown on pricing. Heavy queries may time out or be rejected by structural and resource controls. External Spark infrastructure, when configured, has separate provider costs.

Compatibility and errors

FrostTable uses Spark SQL parsing and execution with a FrostTable-specific validator; it is not PostgreSQL and does not claim complete standard SQL compatibility. Only read-safe query plans are accepted through this endpoint. For SQL requests, use the actual API path POST /api/v1/workspaces/{workspaceId}/sql/query with a JSON body containing sql and optional pagination fields. Invalid syntax, disallowed operations, inaccessible tables, and exceeded limits return errors instead of query results.

See REST API for authentication and request conventions.

Saved queries and SQL endpoints

Choose Save query to keep SQL in the workspace. Saved queries can be loaded and edited from the editor sidebar. To expose a managed query result as a private JSON API, open SQL endpoints from the main navigation, or follow Publish beside a saved query. Select the query, check the full result and confirm publication. A prior editor run is not required. External catalog queries cannot be published. See SQL endpoints for keys, refreshes and limits.