wherobots-catalog package connects SedonaDB to Wherobots-managed catalogs, so you can query their tables without starting a Wherobots runtime.
Queries run on your machine, and SedonaDB reads table files from cloud storage over the network. Wherobots issues the storage credentials for each table, so you don’t configure storage keys.
The integration supports:
- Reading Iceberg v2 and v3 tables, including tables with deleted rows.
- Reading geometry columns, with or without a declared coordinate reference system (CRS). See Work with geometry.
- Writing tables.
INSERT,CREATE TABLE,DELETE, andDROP TABLEfail with a “not implemented” error. Write tables from WherobotsDB instead. - Tables with raster columns. Any query on these tables fails with
Havasu raster columns (rast) cannot be read yet, even if it doesn’t select the raster column. Query them in WherobotsDB instead. - Foreign catalogs.
list_catalogs()includes catalogs such as AWS Glue and Databricks Unity Catalog, but reading them fails withnamespace operations are only valid for MANAGED catalogs. To query them, connect WherobotsDB to external catalogs.
Before you start
Ensure that you have the following:- Python 3.10 or later.
- A Wherobots API key, created for your user or for a service principal.
- Access to the Wherobots-managed catalog you want to read. The samples on this page use the
wherobots_open_datacatalog.
Connect SedonaDB to a Wherobots catalog
1
Install the packages
2
Set your API key
wherobots.catalog.login(api_key=...).3
Connect to your catalogs
login() returns the catalogs that your API key can access. sd.register(wbc) makes them available to SQL in your sd session.4
Verify the connection
overture_maps_foundation namespace, also known as a database:In a Job Run, SedonaDB is preinstalled, so install only
wherobots-catalog. login() finds the Job Run’s credentials, so you don’t need an API key.Browse catalogs
Use attributes or indexing to move from a catalog to a namespace to a table. Use indexing for names that aren’t valid Python identifiers.places assignments return the same table.
Query a table
Query a table with SQL or with the DataFrame API. Both samples find the libraries in a bounding box around Boston. Neither reads data until you call a method such asshow().
- SQL
- DataFrame
Save query results
to_pandas() loads the result into memory on your machine and returns a GeoPandas GeoDataFrame when the result has a geometry column. to_parquet() writes the result to a local file.
Join a table with local data
SedonaDB uses a spatial filter on a catalog table to skip files that can’t match it. A join condition doesn’t skip files, so a join on its own reads the whole table. Filter the catalog table first, then join the result. This sample registers a localGeoDataFrame as a view and counts the places in each area:
EXPLAIN and find WherobotsTableExec in the plan. In the run behind this sample, the plan shows groups=2 with the filter and groups=206 for the join on its own.
Work with geometry
The CRS that SedonaDB uses for a geometry column depends on what the column declares. RunSHOW CREATE TABLE in WherobotsDB to see the declaration:
To see the CRS that SedonaDB uses, print the column from the table’s schema:
Troubleshooting
Authentication is not configured
Authentication is not configured
WHEROBOTS_API_KEY isn’t set in the environment that runs Python. Set it, or pass the key with wherobots.catalog.login(api_key=...).If the error is Authentication failed (HTTP 401) instead, the key isn’t valid. Create a new API key.Mismatched CRS arguments: ogc:crs84 vs None
Mismatched CRS arguments: ogc:crs84 vs None
The geometry in your query has no CRS, or a different CRS from the column. Pass an SRID to the function that creates the geometry, such as
ST_MakeEnvelope(-71.19, 42.22, -70.92, 42.40, 4326). If the two CRSs differ, convert one with ST_Transform.Cannot create a view from a Wherobots Catalog DataFrame
Cannot create a view from a Wherobots Catalog DataFrame
to_view() isn’t available on a table object. Create the view from SQL in your own session instead:Next steps
Wherobots open data
Find the datasets in the
wherobots_open_data catalog.Geometry tables
Create tables with geometry columns that declare a CRS.
SedonaDB documentation
Learn the SedonaDB SQL functions and DataFrame API.

