SQL statements
SQL statements exposed through the Query API, with syntax and permission limits.
SQL statements
These pages describe the SQL interface exposed by RawTree Cloud and RawTree BYOC. RawTree has a broader SQL model than this API permits. See ClickHouse compatibility and API scope.
POST /v1/query accepts one SQL statement per request. Access-control and
scheduling statements require an administrator API key. Select the target
database with the request's database selection; row policies use that selected
database when their table is unqualified.
Supported statement families
| Statement | Reference |
|---|---|
CREATE ROLE, DROP ROLE | Role |
GRANT SELECT, GRANT INSERT | Grant |
CREATE ROW POLICY, DROP ROW POLICY | Row policy |
CREATE SETTINGS PROFILE, DROP SETTINGS PROFILE | Settings profile |
CREATE WORKLOAD, DROP WORKLOAD, CREATE RESOURCE, DROP RESOURCE | Workload |
SELECT, WITH | SELECT |
EXPLAIN | EXPLAIN |
DESCRIBE | DESCRIBE |
ALTER TABLE | ALTER TABLE |
CREATE NAMED COLLECTION | Named collections |
KILL MUTATION | KILL MUTATION |
CREATE TABLE | CREATE TABLE |
INSERT ... SELECT | INSERT ... SELECT |
The parser validates supported forms before the service sends them to RawTree. Unsupported forms return a client error with a hint for the accepted grammar.