Opteryx SQL

Mostly ANSI-compliant SQL with analytical extensions.

Statements Functions

Statement Support

SELECT → SELECT, SELECT DISTINCT, SELECT DISTINCT ON
WHERE → Filter rows based on conditions
TIMESTAMP AS OF → Time travel queries (table version as of given timestamp)
VERSION AS OF → Time travel by snapshot id, or VERSION AS OF PREVIOUS for the version before the current one
JOIN → INNER, LEFT, RIGHT, CROSS, LEFT SEMI, LEFT ANTI
GROUP BY → Group rows by columns
HAVING → Filter grouped results
ORDER BY → ORDER BY column ASC|DESC
LIMIT → Limit number of rows returned
OFFSET → Skip specified number of rows
UNION → UNION, UNION ALL to combine query results
CLONE → CREATE TABLE target CLONE source, or CREATE COLLECTION target CLONE source — fork a dataset without copying its data
RESYNC → ALTER TABLE fork RESYNC [FORCE] — bring a fork back up to date with what it was cloned from
DETACH → ALTER TABLE fork DETACH — copy what a fork borrowed and end the relationship
CREATE SECRET → CREATE [OR REPLACE] SECRET name IN workspace (TYPE 'gcs_service_account' | 'aws_access_key' | 'http_endpoint', KEY 'value', SCOPE 'gs://bucket/prefix/', …) — store a write-only credential. Inline values are lifted out before the statement is stored; history shows :redacted_key. Needs owner on the whole workspace
DROP SECRET → DROP SECRET [IF EXISTS] name IN workspace — stop using a credential (also revoke it at its source if it leaked)
SHOW SECRETS → SHOW SECRETS IN workspace, or SELECT * FROM workspace.information_schema.secrets — name, type, scope, created/updated by and at, last used, use count. Never the value
credentials => → READ_PARQUET / READ_JSONL / READ_CSV('gs://bucket/prefix/*.parquet', credentials => 'workspace.secret') — read a private bucket with a stored secret; globs work, every file must be under its SCOPE. Secrets docs

Functions

Loading functions…

Loading operators…