wherobots-dbt) makes Wherobots Cloud a target in a dbt project. You write models as Spatial SQL files. dbt builds them in dependency order and Wherobots runs them against your catalogs. Your spatial models are then version-controlled, tested, and documented like the rest of your dbt project.
Benefits
Spatial models work like any dbt model
Spatial models work like any dbt model
ref() dependencies, and lineage, selectors, and scheduling work as they do in any dbt project. Each dbt invocation runs against one target, so if the same project also builds models on another warehouse, build the Wherobots models and the warehouse models in separate runs, each with its own target and a selector. The Wherobots models can read only catalogs your organization can access, so any warehouse output they depend on has to be in one of those catalogs. See Read from other catalogs.Tests and documentation work as usual
Tests and documentation work as usual
unique, not_null, relationships, accepted_values), singular tests, and dbt docs generate all work against Wherobots relations. You can assert spatial invariants, such as a consistent spatial reference identifier (SRID), with plain SQL tests.Havasu tables by default
Havasu tables by default
table, incremental, and snapshot — materializes as a Havasu (Apache Iceberg) table, so you get schema evolution, partitioning, and time travel without configuring a file format. A view model stays a view, and an ephemeral model is never persisted at all.Geometry is a column type
Geometry is a column type
Before you start
Wherobots requirements
Wherobots requirements
- A Wherobots Account. See Create a Wherobots Account.
- A Wherobots API key. See API keys.
- A catalog you can write to. The adapter has no implicit default catalog, so you must name one in your profile. See Data Hub.
dbt requirements
dbt requirements
- Python 3.10 or later.
- dbt Core 1.9 or later (below 2.0).
- Familiarity with dbt projects, profiles, and models. See the dbt documentation.
Install the adapter
Install the adapter from PyPI into the same Python environment as dbt:dbt.adapters.wherobots, so any profiles.yml target with type: wherobots resolves automatically with no further configuration.
Configure your profile
Add a Wherobots target to profiles.yml
type: wherobots to ~/.dbt/profiles.yml. Read the API key from an environment variable so no secret is written to disk.catalog is the Wherobots name for dbt’s database. Use one or the other, never both — dbt rejects a target that sets both keys.Export your API key
Point your project at the profile
profile: in dbt_project.yml to the profile name you defined above.Verify the connection
dbt debug from your project directory.Connection test: [OK connection ok], along with the resolved host, port, database, schema, threads, retries, runtime, and region. Your API token is not included in this output.The first connection provisions Wherobots compute, which can take several minutes. dbt logs provisioning heartbeats while it waits, so you can tell the run is not stuck.Profile reference
The following keys are valid in atype: wherobots output.
Required
Optional
Read from other catalogs
The profile’scatalog and schema control where your models are written. Inputs are separate: a source’s database: key names the catalog that source reads from, so one project can read Wherobots-hosted catalogs and write to your own.
bbox columns keeps the scan to New York City instead of every place on the planet:
wherobots_open_data is available to every Organization Edition. wherobots_pro_data is available only to paid Organization Editions. See Spatial catalog. If a source fails to resolve, see Troubleshooting.
What works today
Limitations
Query cancellation is not supported
Query cancellation is not supported
dbt run stops the dbt process but does not stop work already running on the server. Let a long query finish, or stop the runtime from the Wherobots Cloud interface.Only token authentication is supported
Only token authentication is supported
authenticator must be token and api_token must be set. Single sign-on and OAuth are not available through the adapter.on_schema_change='sync_all_columns' is unsupported
on_schema_change='sync_all_columns' is unsupported
alter column ... type, which the Iceberg catalog rejects. Use append_new_columns, fail, or ignore.Non-string seed column_types overrides fail
Non-string seed column_types overrides fail
+column_types: {birthday: date} fails at analysis time. Declare the column as string and cast it in a downstream model instead. The geometry override is the exception — it is handled by the geometry type handler. See Spatial data in dbt models.Seeds cannot declare a geography column
Seeds cannot declare a geography column
+column_types: {g: geography} fails with the engine’s UNSUPPORTED_DATATYPE error, because a bare geography column declares no coordinate reference system. Models can still materialize geography columns. See Geography.Model contracts are not enforced
Model contracts are not enforced
contract: {enforced: true} builds as a plain create table as select. The adapter does not check the query’s columns or types against the contract.Troubleshooting
Wherobots profile is missing 'catalog' (dbt 'database')
Wherobots profile is missing 'catalog' (dbt 'database')
catalog nor database set. The adapter has no implicit default catalog.Solution:- Add
catalog: <a-catalog-you-can-write-to>to the output inprofiles.yml. - Do not set both
cataloganddatabase— dbt rejects the target before validation runs.
dbt run appears to hang on the first model
dbt run appears to hang on the first model
- Watch for
provisioningheartbeats in the dbt log — they confirm the attach is progressing. - Attach to a warm runtime by leaving
force_newatfalse, or raiseshutdown_after_inactive_secondsso your runtime stays available between runs.
TABLE_OR_VIEW_NOT_FOUND on a source
TABLE_OR_VIEW_NOT_FOUND on a source
database: names a catalog your organization cannot read, or the relation does not exist in that catalog.Solution:- Confirm the catalog is attached to your organization in Data Hub.
wherobots_pro_datais available only to paid Organization Editions. Contact Wherobots Support to confirm yours.
MERGE_CARDINALITY_VIOLATION during an incremental run
MERGE_CARDINALITY_VIOLATION during an incremental run
unique_key value that already exists in the table. dbt’s unique_key contract requires the key to be unique in the model’s output. The table is left unchanged.Solution:- Deduplicate the model’s select so each
unique_keyvalue appears once. - Add a
uniquetest on the key. The run fails only when a duplicated key already exists in the table. Duplicates of a new key are inserted with no error, and the test is what catches them.

