Skip to main content

dbt logo

dbt

dbt enables data analysts and engineers to transform their data using the same practices that software engineers use to build applications.

dbt is the T in ELT. Organize, cleanse, denormalize, filter, rename, and pre-aggregate the raw data in your warehouse so that it's ready for analysis.

dbt-spark

dbt-spark enables dbt to work with Apache Spark. For more information on using dbt with Spark, consult the docs.

Getting started

Review the repository README.md as most of that information pertains to dbt-spark.

Running locally

A docker-compose environment starts a Spark Thrift server and a Postgres database as a Hive Metastore backend. Note: dbt-spark now supports Spark 3.3.2.

The following command starts two docker containers:

docker-compose up -d

It will take a bit of time for the instance to start, you can check the logs of the two containers. If the instance doesn't start correctly, try the complete reset command listed below and then try start again.

Create a profile like this one:

spark_testing:
  target: local
  outputs:
    local:
      type: spark
      method: thrift
      host: 127.0.0.1
      port: 10000
      user: dbt
      schema: analytics
      connect_retries: 5
      connect_timeout: 60
      retry_all: true

Connecting to the local spark instance:

  • The Spark UI should be available at http://localhost:4040/sqlserver/
  • The endpoint for SQL-based testing is at http://localhost:10000 and can be referenced with the Hive or Spark JDBC drivers using connection string jdbc:hive2://localhost:10000 and default credentials dbt:dbt

Note that the Hive metastore data is persisted under ./.hive-metastore/, and the Spark-produced data under ./.spark-warehouse/. To completely reset you environment run the following:

docker-compose down
rm -rf ./.hive-metastore/
rm -rf ./.spark-warehouse/

Additional Configuration for MacOS

If installing on MacOS, use homebrew to install required dependencies.

brew install unixodbc

Contribute

Release files for in-dbt-spark 1.9.53

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for in-dbt-spark 1.9.53
File Size Uploaded
in_dbt_spark-1.9.53.tar.gz 152.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for in-dbt-spark 1.9.53
File Interpreter ABI Platform
in_dbt_spark-1.9.53-py3-none-any.whl Python 3 none any Details

Total release size: 281.4 kB

Release files / in_dbt_spark-1.9.53.tar.gz

Download URL in_dbt_spark-1.9.53.tar.gz
Size 152.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1187af8057d583097d8b973f50becfca97f6fdebefb8e7be185c31d1c0370065
BLAKE2b-256 checksum
How to use checksums
d02ecc5c97d45b860228c2ff464d4a3f32a37efa53e928a712b925aef21b18be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / in_dbt_spark-1.9.53-py3-none-any.whl

Download URL in_dbt_spark-1.9.53-py3-none-any.whl
Size 129.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c60d6ea8f4d52ec578481f6b10cb508746e85b1d4215a0b2416cb08ba6c5c643
BLAKE2b-256 checksum
How to use checksums
aad15c4d14cfa4a38c094a1b453856a90c9d52fbc2bc3499381b4e3f9258f1e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release history Release notifications | RSS feed

This release

1.9.53 This release

2 release files

1.9.51

2 release files

1.9.50

2 release files

1.9.48

2 release files

1.9.47

2 release files

1.9.46

2 release files

1.9.45

2 release files

1.9.44

2 release files

1.9.41

2 release files

1.9.40

2 release files

1.9.39

2 release files

1.9.38

2 release files

1.9.37

2 release files

1.9.36

2 release files

1.9.34

2 release files

1.9.33

2 release files

1.9.32

2 release files

1.9.31

2 release files

1.9.30

2 release files

1.9.29

2 release files

1.9.28

2 release files

1.9.27

2 release files

1.9.26

2 release files

1.9.25

2 release files

1.9.24

2 release files

1.9.23

2 release files

1.9.16

2 release files

1.9.15

2 release files

1.9.14

2 release files

1.9.13

2 release files

1.9.9

2 release files

1.9.8

2 release files

1.9.7

2 release files

1.9.6

2 release files

1.9.5

2 release files

1.9.4

2 release files

1.9.3

2 release files

1.9.2

2 release files

1.5.16

2 release files

1.5.15

2 release files

1.5.14

2 release files

1.5.13

2 release files

1.5.11

2 release files

1.5.10

2 release files

1.5.9

2 release files

1.5.8

2 release files

1.5.7

2 release files

1.5.6

2 release files

1.5.5

2 release files

1.5.4

2 release files

1.5.3

2 release files

1.5.2

2 release files

1.5.0

2 release files

1.2.8

2 release files

1.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page