liveBook · Manning

Describe

As explained in DuckDB in Action

DESCRIBE is a SQL statement that reports the structure and metadata of a relation or query result.

DESCRIBE reveals the shape of a relation before analysis: column names, types, nullability, keys, defaults, and extra metadata. Use it when the input schema is uncertain. section 1.7.3 section 3.3.4

Inspect tables, queries, and files

Run DESCRIBE readings; to inspect a table, or DESCRIBE SELECT read_on, power FROM readings; to inspect a query result. DuckDB also supports DESCRIBE(FROM read_csv('Tags.csv.gz')); for compressed CSV data, then lets you select and aggregate known columns. section 3.3.4 section 10.1.3

Listing 10.2 Describing the metadata of the Tags file
DESCRIBE(FROM read_csv('Tags.csv.gz'));

Inspect the inferred column metadata for the Tags CSV before querying its fields. section 10.1.3

How DuckDB in Action covers it

How deep it goes
Explains metadata inspection across relations and files, while deferring detailed statistics and analytical query construction to subsequent operations.
Examples
Uses readings, constructed VALUES tuples, and a compressed Stack Overflow Tags CSV to demonstrate metadata inspection and follow-up analysis.
What it assumes
Assumes basic SQL and relational concepts while grounding relations as tables, views, query results, and tuples.
What you can do after
Evaluate/understand input shape, choose available columns, and build informed DuckDB queries over tables, query results, or files.
How it connects
Connects schema metadata with tables, views, query results, CSV files, Parquet files, aggregations, and data types.

Also explained in

Compare how 2 books explain describe →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of DuckDB in Action. The section links point to the parts of the book it draws on.