Beacon Data Lake CLI is a thin, cmd2-powered shell that sits on top of
the Beacon Python SDK. It gives analysts and operators a quick way to
connect to a Beacon node, browse registered datasets, inspect logical
tables, and execute SQL or JSON-based queries without writing scripts.
- Instant Beacon sessions:
beacon-datalake-cli --url https://...auto-connects and drops you into an interactive prompt with command completion, history, and colorized output courtesy of Rich. - Schema-aware exploration: list or inspect datasets and logical tables, including per-column data types and format metadata.
- Flexible querying: run ad-hoc SQL with preview/stream/export options or use the fluent query builder to add select, filter, sort, spatial, and distinct clauses via flags.
- Admin workflows: upload, download, or delete dataset files plus create or remove logical tables when you have the right credentials.
- Rich previews: tabular results show column data types, memory usage estimates, and query timing metrics; export to Parquet, Arrow, CSV, NetCDF, or GeoParquet when needed.
- Python 3.10 or newer
- Access to a Beacon node plus any JWT token or basic auth credentials required by that deployment
beacon-apicompatible server version (the CLI ships with SDK as a dependency)
pip install beacon-datalake-cliPrefer to keep tools isolated? Install via pipx install beacon-datalake-cli and you will get the same beacon-datalake-cli
entry point on your PATH.
# Connect immediately using startup flags
beacon-datalake-cli --url https://beacon.example.com --jwt-token "$TOKEN"
# Or launch the shell first, then run connect inside the prompt
beacon-datalake-cli
beacon_cli> connect https://beacon.example.com --basic-auth user passOnce connected:
- Run
dashboardfor a full-screen command palette. - Check your session with
statusto confirm version and admin access. - Explore data with commands such as:
list_datasets --pattern *.parquetdataset_schema /data/sst/sample.parquetlist_tablesandlist_table_schema climate_daily
- Query live data:
beacon_cli> sql "SELECT station_id, temp_c FROM climate_daily LIMIT 10" --rows 10
# JSON query builder example (select + filters + streaming preview)
beacon_cli> query_builder --table climate_daily \
--select station_id --select temp_c:temperature_c \
--range observation_date "2024-01-01" "2024-01-31" \
--stream --rows 20| Area | Command (args) | Purpose |
|---|---|---|
| Session | connect, status, dashboard, quit |
Manage CLI session and connection |
| Datasets | list_datasets, dataset_schema, upload_dataset, download_dataset, delete_dataset |
Discover and manage registered dataset files |
| Tables | list_tables, list_table_schema, create_table, delete_table |
Inspect logical tables or administer them |
| Querying | sql, query_builder |
Execute SQL or JSON builder queries with preview/export/stream options |
Use help <command> for detailed usage, supported flags, and examples.
- The package exposes a single console script named
beacon-datalake-clidefined inpyproject.toml. - To test local changes, install in editable mode:
pip install -e .then runbeacon-datalake-clifrom your virtual environment.