SQL workbench
The SQL workbench runs standard SQL against your collections' tables. Every query is filtered to the collections you may read.
Engines
| Engine | Runs | Use it for |
|---|---|---|
| DuckDB WASM | In your browser | Interactive exploration without a server round trip. |
| DuckDB | On the platform | Default queries, including any pinned snapshot. |
| Amazon Athena | In AWS (optional) | Teams that already analyze in AWS. |
Query a snapshot
Tables are open Apache Iceberg. Passing a snapshot identifier reads the table as it was at that moment, which is how a cohort, release or finding re-runs identically.
SELECT site, COUNT(DISTINCT subject_id) AS n
FROM iceberg_scan('s3://<your-bucket>/warehouse/nda/cde_phq901/',
version = '<snapshot_id>')
WHERE collection_id = 12
GROUP BY site;
Note The workbench builds the table path and adds the collection filter for you. The example shows what runs underneath.
Permissions
Queries always carry the list of collections you may read, so there is nothing to filter afterwards. In the browser engine, the files behind a query are fetched through a proxy that checks your access again on every request. If a permission changes, it takes effect on the next fetch.