Chalk SQL supports a focused set of SQL statements built around reading and introspecting data across your Chalk environment. Each page in this section documents one statement in detail, including its clauses, restrictions, and examples.

StatementDescription
SELECTQuery data from data sources, the offline store, and the Chalk catalog
DESCRIBE / SHOWInspect the schema of a table or query, or list available tables
EXPLAINShow the physical plan for a statement, optionally with execution statistics
COPY ... TOWrite the result of a query to Parquet, CSV, or Iceberg files

For the full list of scalar, aggregate, and table-valued functions available in Chalk SQL expressions, see the Chalk SQL function reference.

General rules

  • One statement per query. Each Chalk SQL request executes exactly one statement. Submitting multiple ;-separated statements returns an error.
  • Read-only. Chalk SQL is a read-only interface over the Chalk catalog and your configured data sources. The one statement that produces output outside of the query response is COPY ... TO, which exports query results to files without modifying any source.
  • DuckDB-style grammar. Chalk SQL parses queries with a DuckDB-derived grammar, so syntax generally follows DuckDB’s SQL dialect. Chalk SQL implements its own compiler and execution engine, however, so not every DuckDB construct is supported — each statement page lists what is.
  • Fully qualify catalog tables. Tables in the Chalk catalog and in configured data sources are referenced by a quoted, fully-qualified "catalog.schema.table" name, for example SELECT * FROM "chalk.online_store.keys". See Referencing the Chalk Catalog.