dbt-spark
The Apache Spark adapter plugin for dbt
What it is and what it does
dbt-spark is a plugin that connects dbt (a data transformation tool built on SQL and YAML) to Apache Spark, allowing data engineers and analysts to apply software engineering practices—version control, testing, documentation, modularity—to Spark-based data pipelines. It handles the translation of dbt's declarative transformation models into Spark SQL, managing the execution and metadata tracking within a Spark cluster or local Thrift server.
The adapter sits between dbt-core and Spark, inheriting dbt's ecosystem (dbt-adapters, dbt-common) while adding Spark-specific connection logic and SQL dialect support. It is production-ready (Development Status 5), actively maintained, and supports modern Python versions (3.10–3.13) across Linux, macOS, and Windows.
Use it for:
- Transform raw data in a Spark warehouse using dbt models, organizing and cleansing data for downstream analytics.
- Build modular, testable data pipelines in Spark with version control and documentation via dbt's YAML and SQL interface.
- Integrate Spark-based ELT workflows into a dbt Cloud or dbt Core project alongside other warehouse adapters.
- Run local Spark development and testing using the docker-compose Thrift server setup for rapid iteration.
- Manage Hive Metastore schemas and table lineage through dbt's metadata layer on top of Spark.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
dbt-spark is the Apache Spark adapter for dbt, enabling data transformation workflows in Spark using dbt's SQL and YAML-based modeling practices.
Yes. dbt-spark is production-ready, actively maintained, has no known vulnerabilities, low install friction, and a permissive license. Install it if you use Apache Spark and want to adopt dbt's transformation and testing practices. Ensure your Spark cluster is reachable and you have Python 3.10 or later.
Install
dbt-spark on PyPI
pip
pip install dbt-sparkuv
uv add dbt-sparkpoetry
poetry add dbt-sparkInstalling dbt-spark
Before you install
Low install friction with a pure-Python wheel. Actively maintained with a release 29 days ago and recent commits. Requires Python 3.10 or later and depends on dbt-core, dbt-adapters, dbt-common, and sqlparams.
License in practice
Licensed under Apache Software License (permissive), allowing commercial use, modification, and distribution with minimal restrictions.
Quickstart
pip install dbt-spark
Create a dbt profile with Spark connection details (host, port, schema), then run:
dbt run
Requires Python 3.10 or later; a running Spark instance (local, Thrift server, or cloud) with network connectivity; Spark 3.3.2 or later supported.
Verify before relying
- Whether all Spark connection methods (thrift, http, databricks, etc.) are equally well-supported in this version.
- Performance characteristics and scalability limits for large transformation workflows.
- Compatibility matrix with specific Spark and Hadoop versions beyond the stated 3.3.2 support.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.10.0) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — dbt-adapters, dbt-common, dbt-core, sqlparams |
| Maintenance | actively maintained — 29 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 6,546,930/month — #1,891 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: dbt_spark-1.11.0-py3-none-any.whl
Keywords: adapter, adapters, database, dbt, dbt Cloud, dbt Core, dbt Labs, dbt-core, elt, spark
Tags
More Database packages
psycopg2-binary is a PostgreSQL database…
copyleft · top 1,000 on PyPI
redisPython client library for connecting to and…
permissive · top 1,000 on PyPI
ydbYDB Python SDK is the official client library…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
sqlparsesqlparse tokenizes SQL text into a tree of…
permissive · top 1,000 on PyPI
dbt-adaptersProvides base adapter protocols and shared…
permissive · top 1,000 on PyPI
dbt-bigquerydbt-bigquery is a dbt adapter that enables data…
permissive · top 5,000 on PyPI
dbt-databricksdbt-databricks is a dbt adapter that enables…
permissive · top 5,000 on PyPI
dbt-snowflakedbt-snowflake is the Snowflake adapter for dbt,…
permissive · top 5,000 on PyPI
dbt-redshiftdbt-redshift is an adapter that enables dbt to…
permissive · top 5,000 on PyPI
dbt-oracledbt-oracle is a dbt adapter that enables data…
permissive · top 15,000 on PyPI
dbt-postgresdbt-postgres is a dbt adapter that connects dbt…
permissive · top 5,000 on PyPI
dbt-fabricsparkA dbt adapter that connects dbt to Apache Spark…
permissive · top 5,000 on PyPI
dbt-gluedbt-glue is a dbt adapter that enables running…
permissive · top 15,000 on PyPI
dbt-coredbt-core transforms raw data in a warehouse…
permissive · top 1,000 on PyPI
dbt-athena-communityA dbt adapter that enables data transformation…
permissive · top 5,000 on PyPI