Skip to content
View dbtgeospatial's full-sized avatar

Block or report dbtgeospatial

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. Markdown is supported. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
dbtgeospatial/README.md

dbt + Geospatial — Transforming Spatial Data in the Modern Stack

dbt + Geospatial

Transforming Spatial Data in the Modern Stack
Production-grade spatial pipelines with dbt, PostGIS, and DuckDB.

🌐 www.dbtgeospatial.org


What this is

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.

Who it's for

  • 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

What you'll find

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.

Why it's different

  • 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.

Tech

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

License & links

© dbt + Geospatial. Content and code in this repository are provided for reference and educational use.

Popular repositories Loading

  1. dbtgeospatial dbtgeospatial Public

    Production-grade spatial data pipelines with dbt, PostGIS, and DuckDB — practical guides on CRS governance, geometry validation, spatial macros, and CI testing.

    CSS