Query workspace data
submit_queryRun a SQL query against the Iceberg tables loaded into a workspace. To list the tables that actually exist in the workspace, run SHOW TABLES — this is the authoritative source (unlike list_data's specs, which describe pipelines, not live tables). Qualified table references (catalog/schema prefixes, e.g. information_schema.tables) are rejected; reference tables by name only. Table functions that introspect the engine itself (e.g. duckdb_functions(), duckdb_tables()) are also rejected as external-data-source access — don't try to discover available SQL functions this way. A BLOB column is very likely an HLL sketch (produced by a merge-mode table-source spec's approximate-distinct aggregate — see onboard_data_source's merge option): decode it with datasketch_hll_estimate(col), or datasketch_hll_estimate(datasketch_hll_union(12, col)) to union several rows to a coarser grain first. If the user's goal is an HTML page/dashboard built from these results (not just seeing the data here), do NOT default to embedding this result set as a static snapshot. Ask the user first: (a) a one-time static page with these results baked in, which goes stale and never changes again, or (b) a live page that logs in and queries DPF itself whenever it's opened, so it always reflects current data. If they want live/dynamic (or don't say and the data looks like it changes over time), read the dpf://examples/auth-and-query.html resource and adapt that pattern (login form, JWT cookie, fetch-based query call) instead of hand-rolling auth.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | SQL query, e.g. SELECT * FROM customers LIMIT 10 | |
| workspaceId | No | Workspace to act on. Defaults to your only workspace if you have exactly one. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | ||
| schema | Yes | Column name -> DuckDB type | |
| rowCount | No | ||
| executionTimeMs | No |