Skip to content

Notebooks

databaas_utils.user gives you a catalog, file store, index and zarr group authenticated as you. The same notebook runs on the platform and on a laptop.

from databaas_utils.user import get_catalog, get_store, get_zarr_group

catalog = get_catalog()
catalog.load_table("open_meteo.daily_summary").scan(limit=10).to_arrow()

store = get_store(namespace="knmi")
group = get_zarr_group("harmonie_zarr", namespace="knmi", read_only=True)

Formerly databaas_utils.notebook

The module used to be called databaas_utils.notebook. That import still works, so existing notebooks need no change.

How it picks who you are

Where the code runs Identity
Databaas JupyterHub pod The hub gives the notebook your access token. Nothing to configure.
Anywhere else The session saved by databaas login.

Pass profile="name" to any helper to force a databaas login session, even inside JupyterHub. Pass warehouse="..." to use a different warehouse.

Inside JupyterHub the catalog is CATALOG_URI (default http://lakekeeper:8181) and the warehouse is LAKEKEEPER_WAREHOUSE (default databaas-lakehouse).

The helpers

Function Returns Extra needed
get_catalog() A pyiceberg catalog. Use namespace.table identifiers. iceberg
get_store() A file store for generic tables obstore
get_index() The Iceberg index of stored files iceberg
get_zarr_group() A zarr.Group zarr
get_settings() LakehouseSettings, for anything else none

Common tasks

Read a table into pandas

df = catalog.load_table("open_meteo.daily_summary").scan().to_pandas()

Download a file

from pathlib import Path

store = get_store(namespace="knmi")
store.get("harmonie", "2026/09/30/run.grib2", Path("run.grib2"))

See what is stored

for meta in store.list("harmonie", prefix="2026/09"):
    print(meta["path"], meta["size"])

Troubleshooting

AuthenticationError: the hub could not refresh your login : Your Zitadel session expired. Log out of Jupyter and back in.

ConfigurationError: no profile given and none configured : You are outside JupyterHub and have not run databaas login.

A 403 from Lakekeeper : You are signed in, but an admin has not granted you access to that warehouse or namespace. Run databaas whoami to get the user id to give them.

RemoteSigningUnavailable : obstore-databaas is missing or shadowed by upstream obstore. See Install.

DAGs

Do not use databaas_utils.user in a DAG. A task authenticates through its Airflow connection: see Airflow DAGs.