Metadata-Version: 2.5
Name: wherobots-dbt
Version: 0.1.0
Summary: The Wherobots adapter plugin for dbt
Project-URL: Homepage, https://wherobots.com
Project-URL: Documentation, https://docs.wherobots.com/develop/dbt
Author-email: Wherobots <support@wherobots.com>
License-Expression: Apache-2.0
License-File: LICENSE
Requires-Python: >=3.10
Requires-Dist: dbt-adapters<2.0,>=1.9.0
Requires-Dist: dbt-common<2.0,>=1.12.0
Requires-Dist: dbt-core<2.0,>=1.9.0
Requires-Dist: wherobots-python-dbapi>=0.28.1
Description-Content-Type: text/markdown

# wherobots-dbt

The Wherobots adapter for [dbt](https://www.getdbt.com/). Write spatial models as SQL, run them on
Wherobots Cloud, and keep them version-controlled, tested, and documented like the rest of your dbt
project.

## Install

```bash
pip install wherobots-dbt
```

Requires Python 3.10 or later and dbt Core 1.9 or later (below 2.0).

## Configure

Add a Wherobots target to `~/.dbt/profiles.yml`. Read the API key from an environment variable so no
secret is written to disk.

```yaml
my_project:
  target: dev
  outputs:
    dev:
      type: wherobots
      host: api.cloud.wherobots.com
      catalog: my_catalog          # a catalog you can write to (dbt's `database`)
      schema: my_namespace
      api_token: "{{ env_var('WHEROBOTS_API_KEY') }}"
      runtime: micro               # optional
      region: aws-us-west-2        # optional
      threads: 1
```

```bash
export WHEROBOTS_API_KEY="<your-api-key>"
dbt debug
```

## What works

- `dbt debug`, `seed`, `run`, `test`, `snapshot`, `docs generate`, `show`, and `source freshness`.
- Materializations: `view`, `table`, `ephemeral`, `incremental` (`append`, `merge`,
  `delete+insert`, `insert_overwrite`), and `snapshot`. Persisted models are Havasu (Apache Iceberg)
  tables.
- Spatial columns: `geometry` seeds load from WKT, EWKT, GeoJSON, or WKB with a real SRID, and models
  can materialize `geometry`, `geography`, and `raster` columns.

## Documentation

See [Wherobots dbt Adapter](https://docs.wherobots.com/develop/dbt) for the profile reference,
materializations, and working with spatial data.

## License

Apache-2.0
