Skip to content

Pre-release documentation

This describes Beacon 2.0.0-rc3, a release candidate. Behavior documented here may still change before 2.0.0 ships, and some of it is not in any released build yet. For the current stable release, see the 1.8.0 documentation.

SUMMARIZE

SUMMARIZE profiles a table or a query. It returns one row for each column. Run it first on a new dataset.

sql
SUMMARIZE obs;
column_namecolumn_typeminmaxdistinctavgstdcountnull_percentage
temperatureFloat6410.030.0320.010.0325.0
depthInt640100362.547.940.0
platformUtf8AB240.0

Beacon returns the columns in the order of the source.

Forms

sql
SUMMARIZE obs;                                   -- a table
SUMMARIZE public.obs;                            -- schema-qualified
SUMMARIZE SELECT depth FROM obs WHERE depth > 0; -- any query
SUMMARIZE (SELECT * FROM read_parquet('obs/*.parquet'));

::: warning A table function needs a query
`SUMMARIZE` takes a **name** or a **query**. A bare
[table function](/docs/2.0.0-rc3/sql/table-functions) is neither, so this does not parse:

```sql
SUMMARIZE read_netcdf('argo/*.nc');   -- error

Wrap it in a query instead:

sql
SUMMARIZE (SELECT * FROM read_netcdf('argo/*.nc'));

:::


## What each column means

- **min / max**: for columns with an order, such as numbers, strings and timestamps. Beacon returns them as text.
- **distinct**: the exact number of distinct non-null values.
- **avg / std**: for numeric columns only. Other columns get `NULL`.
- **count**: the number of non-null values.
- **null_percentage**: the share of `NULL` values, from `0` to `100`.

## Notes

`SUMMARIZE` becomes an ordinary aggregate query with one pass. It therefore works on a
read-only connection. It needs no special
privileges. It scans the source once.

Released under the AGPL-3.0 License.