ReferenceSQL ReferenceStatements

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

StatementReference
CREATE ROLE, DROP ROLERole
GRANT SELECT, GRANT INSERTGrant
CREATE ROW POLICY, DROP ROW POLICYRow policy
CREATE SETTINGS PROFILE, DROP SETTINGS PROFILESettings profile
CREATE WORKLOAD, DROP WORKLOAD, CREATE RESOURCE, DROP RESOURCEWorkload
SELECT, WITHSELECT
EXPLAINEXPLAIN
DESCRIBEDESCRIBE
ALTER TABLEALTER TABLE
CREATE NAMED COLLECTIONNamed collections
KILL MUTATIONKILL MUTATION
CREATE TABLECREATE TABLE
INSERT ... SELECTINSERT ... 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.