Use DESCRIBE to inspect the columns of a table or query. Use SHOW to discover objects available to Chalk SQL.

​
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

syntax
DESCRIBE {< table_name > | < select_statement >};


SHOW < table_name >;


SHOW COLUMNS
FROM
  < table_name >;

All three forms return one row per column. To inspect a table whose name is a SHOW listing keyword, use DESCRIBE or quote the name, for example SHOW "functions".

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 CATALOGS and SHOW SCHEMAS

syntax
SHOW CATALOGS;
SHOW SCHEMAS [ FROM <catalog> ];

Run SHOW CATALOGS to find catalog names. Use SHOW SCHEMAS FROM <catalog> to list the schemas in one of those catalogs. SHOW SCHEMAS lists schemas across available catalogs.

​
SHOW TABLES

syntax
SHOW TABLES [ FROM <scope> ];

Use FROM <scope> to limit the listing to a catalog, a schema, or a qualified catalog.schema name. A single name resolves to a catalog first, then to a schema. Without FROM, the statement lists the tables visible to Chalk SQL, as does this query:

SELECT
  *
FROM
  "chalk.information_schema.tables";

​
SHOW FUNCTIONS, SHOW MODELS, and SHOW COMPUTE_FUNCTIONS

SHOW FUNCTIONS;


SHOW MODELS;


SHOW COMPUTE_FUNCTIONS;

SHOW FUNCTIONS lists SQL functions, including deployed compute functions. SHOW MODELS and SHOW COMPUTE_FUNCTIONS list deployed entries with their qualified names and output types. Use the Chalk information schema to filter or join these listings.

​
SHOW JOBS

SHOW JOBS;

On the native SQL server, SHOW JOBS returns the schedules available through chalk.jobs. See Chalk SQL jobs for the commands that manage them.

​
Limitations

  • Use SHOW CATALOGS to list available catalogs.
  • SUMMARIZE is not supported.