Transforming Spatial Data in the Modern Stack
Production-grade spatial pipelines with dbt, PostGIS, and DuckDB.
dbt + Geospatial is a practical, deeply technical reference for building spatial data pipelines with dbt in a modern, cloud-native analytics stack. It is written for engineers who have already left desktop GIS behind and want to model geometry with the same rigor they bring to any other data product: version-controlled, DAG-driven, tested in CI, and observable in production.
Every guide is grounded in real, runnable SQL, Jinja, and YAML — targeting PostGIS, DuckDB Spatial, BigQuery GIS, and Snowflake, with explicit notes wherever engine behaviour diverges. The focus is implementation, spatial accuracy, and pipeline reliability, not theory.
- Analytics engineers bringing geometry into dbt projects for the first time
- Data platform teams standardizing coordinate systems, tests, and governance across spatial models
- GIS backend developers moving from bespoke scripts to declarative, reproducible transformations
- Spatial data scientists who need trustworthy, query-optimized geometry feeding models and maps
The site is organized into three in-depth areas, each a set of connected guides that move from first principles to advanced, production-ready patterns:
The execution boundaries that separate a brittle GIS script from a reproducible dbt pipeline — choosing the right spatial adapter, setting up PostGIS with dbt, DuckDB spatial extension integration, geometry validation and data quality, and spatial testing in CI pipelines.
Treating geometry, topology, and coordinate systems as first-class citizens — CRS governance policy, spatial data lineage documentation, source freshness for geometry feeds, schema versioning, access scoping, and handling datasets that exceed warehouse memory budgets.
Compile-time abstraction and runtime performance — building custom spatial macros, cross-engine UDF portability, optimizing proximity joins, index hints for spatial queries, and incremental spatial materializations.
- Runnable, not hand-wavy — every guide carries real dbt models, macros, tests, and CI config you can adapt directly.
- Multi-engine by default — patterns are shown across PostGIS, DuckDB, BigQuery, and Snowflake, with the differences called out.
- Correctness first — CRS governance, geometry validity, and SRID consistency are treated as the foundation, because silent spatial bugs are the expensive ones.
- Custom diagrams — each guide includes original, accessible, theme-aware SVG visuals that explain the hardest concept on the page.
This site is a static build produced with Eleventy (11ty), served from the edge on Cloudflare, and installable as a Progressive Web App. The repository contains the full Eleventy source — content, templates, styles, and build configuration.
npm install # install dependencies
npm run build # build the static site into _site/
npm run serve # local dev server with live reload- Live site: www.dbtgeospatial.org
- Organization: github.com/dbtgeospatial
© dbt + Geospatial. Content and code in this repository are provided for reference and educational use.