The DESCRIBE statement returns the schema of a table or of an arbitrary query. SHOW <table> is a synonym for DESCRIBE <table>, and SHOW TABLES lists the tables available in the Chalk catalog.

Examples

-- Describe a data source table
DESCRIBE "my_postgres.public.users";

-- Describe the output schema of a query without running it over all data
DESCRIBE SELECT user_id, sum(amount) AS total
FROM "my_bigquery.my_dataset.transactions"
GROUP BY user_id;

-- List all available tables
SHOW TABLES;

DESCRIBE

DESCRIBE "catalog.schema.table";
DESCRIBE select_statement;
SHOW "catalog.schema.table";

DESCRIBE returns one row per column with the following schema, mirroring DuckDB’s DESCRIBE output:

ColumnTypeDescription
column_namestringThe name of the column
column_typestringThe data type of the column
nullstringYES if the column is nullable, NO otherwise
keystringAlways NULL
defaultstringAlways NULL
extrastringAlways NULL

DESCRIBE is compiled as a table expression, so it can also be used in the FROM clause of a SELECT:

SELECT column_name
FROM (DESCRIBE "my_postgres.public.users")
WHERE column_type = 'string';

SHOW TABLES

SHOW TABLES;

Lists the tables visible to Chalk SQL. It is equivalent to querying the tables view of the information_schema schema:

SELECT * FROM chalk.information_schema.tables;

To explore available catalogs and schemas interactively, you can also use the Database Explorer in the dashboard, or query chalk.information_schema.schemas.

Limitations

  • SHOW DATABASES is not supported.
  • SUMMARIZE is not supported.