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-azure 0.5.1

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-azure 0.5.1
File Size Uploaded Provenance Actions
dbt_polars_catalog_azure-0.5.1.tar.gz 8.1 kB Without provenance Details for dbt_polars_catalog_azure-0.5.1.tar.gz

Built distribution (wheel)

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

Total release size: 13.9 kB

Release files / dbt_polars_catalog_azure-0.5.1.tar.gz

Download URL dbt_polars_catalog_azure-0.5.1.tar.gz
Size 8.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1bfdb03a9c402ba9f6ec3accaa3bec5b71522408380c61839361d88a3c307d43
BLAKE2b-256 checksum
How to use checksums
c728028b3413195a7241adaac962555772e650e298e86baca9e273aa9627b360
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","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_azure-0.5.1-py3-none-any.whl

Download URL dbt_polars_catalog_azure-0.5.1-py3-none-any.whl
Size 5.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d7d3b94f05c34652709080138bc06cace6704557e9d327150d8ef51d77a0f9d6
BLAKE2b-256 checksum
How to use checksums
720a8f8da4ced9a79d821a446e854e15412bfafeb718ae8bc07278bd6b45d518
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","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-azure 0.5.1

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