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.
  • Supported syntax. Each statement page documents the syntax and restrictions that Chalk SQL supports. For expression syntax, see the Chalk SQL function reference.
  • 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.