Skip to main content

dbt-polars

dbt-polars integrates the flexibility and performance of Polars with the data governance and lineage capabilities of dbt.

Try the quick start and run your first dbt-polars project in a few minutes, on your own laptop.

Python and SQL, side by side

Choose Python or SQL per model, whichever fits the transformation best. Both run on the same Polars engine and can freely reference each other. Unlike in dbt-core, Python models are first class and can do anything a SQL model can, even be ephemeral.

Python: models/revenue.py SQL: models/revenue.sql
import polars as pl


def model(dbt, session):
    return (
        dbt.ref("orders")
        .group_by("country")
        .agg(revenue=pl.sum("amount"))
    )
select
    country,
    sum(amount) as revenue
from {{ ref('orders') }}
group by country

The flexibility of Python and Polars

dbt-polars runs on any compute and writes to any of its catalogs

Run anywhere. Polars executes your models in the same process as dbt. You don't need an expensive data warehouse to run your transformations. dbt-polars runs anywhere you can run Python.

Store data where you want. dbt-polars connects to popular platforms through catalogs. Setting one up only takes a few lines in your profile.

Platform Catalog
Local filesystem local
Azure Blob Storage / ADLS Gen2 azure
Databricks Unity Catalog databricks (Delta, Iceberg)
Microsoft Fabric OneLake fabric (Delta, Iceberg)
Snowflake Horizon Catalog snowflake (Iceberg)
Other Iceberg catalogs, such as REST or Glue iceberg

Extensible to any platform. Implement a custom catalog to tailor dbt-polars to your platform. A custom catalog controls authentication, where data is written and how metadata is registered. The dbt-polars engine still performs the writes.

The familiarity of dbt

If you know dbt, you already know how to use dbt-polars. Introduce dbt-polars to your Python projects to benefit from key dbt features, such as lineage, documentation and tests. See dbt compatibility for the full list of supported dbt features.

Lineage graph of a dbt-polars project

Built for efficiency

dbt-polars builds on the full power of the Polars engine. Models run lazily, so Polars optimizes the whole query before running it. Execution and writes are streamed in batches to keep memory use low.

Get started

Install dbt-polars and create a new project:

pip install dbt-polars
dbt init

The quick start walks you through the rest. It runs locally and writes tables to your disk, so you don't need a cloud account. Afterwards, the demo project builds a weather data pipeline that uses many of dbt-polars' features along the way.

Limitations

  • Views are not supported, as there is no database to hold them. Use table or ephemeral instead.
  • The hash macro is not supported. Use a Python model for hashing instead.

Documentation

The full documentation is available at datamindedbe.github.io/dbt-polars.

Metadata

Release files for dbt-polars-catalog-s3 0.5.2

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

Source distribution (sdist)

Source distribution for dbt-polars-catalog-s3 0.5.2
File Size Uploaded Provenance Actions
dbt_polars_catalog_s3-0.5.2.tar.gz 8.1 kB Without provenance Details for dbt_polars_catalog_s3-0.5.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dbt-polars-catalog-s3 0.5.2
File Interpreter ABI Platform Actions
dbt_polars_catalog_s3-0.5.2-py3-none-any.whl Python 3 none any Details for dbt_polars_catalog_s3-0.5.2-py3-none-any.whl

Total release size: 13.8 kB

Release files / dbt_polars_catalog_s3-0.5.2.tar.gz

Download URL dbt_polars_catalog_s3-0.5.2.tar.gz
Size 8.1 kB
Tags Source
SHA-256 checksum
How to use checksums
30bdc282d6dace7f533d6cbda6b234b1f4c6721d509f70e0c8e753d342eeecfd
BLAKE2b-256 checksum
How to use checksums
6fca31d67ec6ddbc76198d907b5ef0cbab6f9cf61b3d3f0f4e3622b77da0e05a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / dbt_polars_catalog_s3-0.5.2-py3-none-any.whl

Download URL dbt_polars_catalog_s3-0.5.2-py3-none-any.whl
Size 5.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ec5170f7af1a61397a0f31bb288cde8ca30ad6558658b20fd916a6b4785f35c8
BLAKE2b-256 checksum
How to use checksums
2abc09af18620f4de527c73c5fbd3832ad6c1c43a7d44303a9d5a7de09ac6c42
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for dbt-polars-catalog-s3 0.5.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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