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.

External Files

Beacon reads files directly in a FROM clause. Every supported format has a read_* table function. The function takes a path or a glob. You register nothing first:

sql
-- one file
SELECT * FROM read_parquet('profiles/2024.parquet') LIMIT 10;

-- a glob across many files
SELECT * FROM read_netcdf('argo/**/*.nc') WHERE temperature > 20;

-- a list of paths or globs
SELECT * FROM read_csv(['a.csv', 'b.csv']);

Beacon resolves a path against its storage root. That root is either a local directory or one S3-compatible bucket, chosen at startup. See Object Storage.

Formats

FormatFunctionSTORED ASRecognized files
Parquetread_parquetPARQUET.parquet
GeoParquetread_geoparquetGEOPARQUET.geoparquet
CSV / TSVread_csvCSV.csv, .tsv
Arrow IPCread_arrowARROW.arrow, .feather
NetCDFread_netcdfNC.nc
HDF5read_hdf5HDF5, H5.h5, .hdf5
Zarrread_zarrZARRzarr.json marker
Atlasread_atlasATLASatlas.json marker
GeoTIFF / COGread_tiffTIFF.tif, .tiff
BBFread_bbfBBF.bbf
Delta Lakeread_deltaDELTA_delta_log/ directory
Apache Icebergread_icebergICEBERGmetadata/ directory
Icechunkread_icechunkICECHUNKrepository directory
ODV ASCIIread_odv_asciinot supported.txt

Beacon finds every format in the dataset store automatically. Delta Lake, Apache Iceberg, Icechunk and ODV ASCII are the exception. Point a function at them. For Delta, Iceberg and Icechunk, you can also use an external table.

Capability matrix

The table above says how to read each format. This one says what you get.

FormatOn an S3 datasets storePushdownQuery outputSchema functionArray format
ParquetFullPredicate + projection, row-group pruningYesread_parquet_schemaNo
GeoParquetFullProjection; no st_* pushdown yetYesread_geoparquet_schemaNo
CSV / TSVFullProjection onlyYesread_csv_schemaNo
Arrow IPCFullProjection onlyYesread_arrow_schemaNo
NetCDFAnonymous only, or full with the Rust readerProjection + dimension selectionYesread_netcdf_schemaYes
HDF5Anonymous only, or full with the Rust readerProjection + dimension selectionYesread_hdf5_schemaYes
ZarrFullProjection + dimension selection, chunk pruningNoread_zarr_schemaYes
AtlasFullPredicate + projection, file-level pruningYesread_atlas_schemaYes
GeoTIFF / COGFullProjection, range requestsNoread_tiff_schemaYes
BBFFullPredicate + projectionNoread_bbf_schemaNo
Delta LakeFullPredicate + projection, file skippingNo, but see belowread_delta_schemaNo
Apache IcebergFullPredicate + projection, file skippingNoread_iceberg_schemaNo
IcechunkFull, see IcechunkProjection + dimension selection, chunk pruningNoread_icechunk_schemaYes
ODV ASCIIFullProjection onlyYesread_odv_ascii_schemaNo

Reading the columns:

  • On an S3 datasets store — how the reader behaves when the server's datasets store is a bucket rather than a local directory. NetCDF and HDF5 read through a pure-Rust reader by default. That reader goes through the object store and authenticates normally. A server that sets BEACON_NETCDF_USE_RUST_READER=false or BEACON_HDF5_USE_RUST_READER=false reads through netCDF-c instead. It then needs the bucket to allow anonymous reads: netCDF-c opens a file by URL and never sees the credential chain. Every other reader authenticates normally already. This is a property of the server's store, not of the query — paths in SQL are relative either way.
  • Pushdown — how much of a query reaches storage instead of running after the read. Predicate means a WHERE clause prunes data. Projection means a narrow SELECT reads fewer columns. Atlas is the strongest: its collection statistics drop whole files before any array is opened.
  • Query output — whether a query result can be written back in that format, with COPY TO or an output.format on the API. Writing rows into an existing table is a different capability: Delta Lake external tables accept INSERT INTO, and managed tables accept the full INSERT / UPDATE / DELETE set, but neither is a query output format.
  • Schema function — the _schema counterpart that returns columns and types without a scan. See Inspect a schema.
  • Array format — whether the file holds N-dimensional arrays, which Beacon flattens into rows. See Arrays to tables.

See inside a file

Check the columns and types of an unfamiliar dataset first. Every reader has a _schema counterpart that does this without a read of any data:

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

SUMMARIZE also gives value ranges, distinct counts and null shares. It profiles every column in one pass:

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

Inspect a schema compares all four ways and says what each one costs.

Read many files at once

A glob (*, **) expands across directories. One call can therefore cover thousands of files. Beacon merges their schemas. It also prunes the files that cannot match your filters.

sql
SELECT platform, avg(temperature) AS t
FROM read_netcdf('argo/**/*.nc')
WHERE depth < 100
GROUP BY platform;

Array formats such as Zarr and Atlas use a marker file. Point at zarr.json or atlas.json, not at the chunk files.

Some files share a schema but have different columns. Combine those files with UNION BY NAME.

Give files a table name

A read_* call fits an ad-hoc query. When many queries share one source, register it once as an external table. Then query it by name:

sql
CREATE EXTERNAL TABLE ocean_profiles
STORED AS PARQUET
LOCATION 'profiles/';

SELECT * FROM ocean_profiles LIMIT 10;

See also

Released under the AGPL-3.0 License.