Skip to content

binste/dbt-ibis

Repository files navigation

dbt-ibis

With dbt-ibis you can write your dbt models using Ibis. You can find the full documentation here.

A simple dbt-ibis model looks like this:

from dbt_ibis import depends_on, ref


@depends_on(ref("stg_stores"))
def model(stores):
    return stores.filter(stores["country"] == "USA")

You can install dbt-ibis via pip or conda:

pip install dbt-ibis
# or
conda install -c conda-forge dbt-ibis

In addition, you'll need to install the relevant Ibis backend for your database.

You can read about the advantages of combining dbt and Ibis in this blog post.

Development

pip install -e '.[dev]'

You can run linters and tests with

hatch run linters
hatch run tests