Skip to main content

A dbt adapter that runs Python models on a Burla cluster.

Project description

dbt-burla

Run dbt Python models on a Burla cluster - no Spark, no Snowpark, no Dataproc.


What this is

dbt-burla is a dbt adapter that wraps your existing warehouse (DuckDB, Snowflake, or BigQuery) and routes Python models to a Burla cluster instead of Snowpark / Dataproc / Databricks.

  • Your SQL models keep running in your warehouse, unchanged.
  • Your Python models run on elastic Burla compute - scale to 1,000+ VMs in one call, any Docker image, any func_cpu/func_ram.
  • Lineage, tests, docs, incremental models - everything dbt already gives you - stays intact.

Install

pip install "dbt-burla[duckdb]"        # self-contained, zero-setup
pip install "dbt-burla[snowflake]"     # production target
pip install "dbt-burla[bigquery]"      # Google Cloud target
pip install "dbt-burla[all]"           # all warehouses

60-second quickstart (DuckDB)

git clone https://github.com/Burla-Cloud/dbt-burla.git
cd dbt-burla/examples/01-quickstart-duckdb
pip install "dbt-burla[duckdb]"
dbt run --profiles-dir .

You'll see three SQL models run in DuckDB, then a Python model execute in-process (because burla_fake: true is set). Flip that to false and set burla_cluster_url to run the Python model on a real cluster.

How it works

        dbt CLI
           │
           ▼
  ┌──────────────────┐
  │  BurlaAdapter    │
  │                  │
  │  SQL models ─────┼──► [warehouse]
  │                  │
  │  Python models   │
  │    1. read ──────┼──► [warehouse]
  │    2. submit ────┼──► [Burla cluster]
  │    3. write ─────┼──► [warehouse]
  └──────────────────┘

See docs/how-it-works.md for a deeper walkthrough.

Writing a Python model

import pandas as pd
from burla import remote_parallel_map


def score_one(row: dict) -> dict:
    row["score"] = (row["amount"] or 0) * 0.01
    return row


def model(dbt, session):
    dbt.config(
        materialized="table",
        burla_workers=100,
        burla_cpus_per_worker=4,
    )
    orders = dbt.ref("stg_orders")
    scored = list(remote_parallel_map(score_one, orders.to_dict("records")))
    return pd.DataFrame(scored)

Configure it once in profiles.yml - use the adapter type that matches your warehouse:

jaffle_shop:
  target: dev
  outputs:
    dev:
      type: burla_snowflake     # or burla_duckdb / burla_bigquery
      account: "{{ env_var('SNOWFLAKE_ACCOUNT') }}"
      user: "{{ env_var('SNOWFLAKE_USER') }}"
      password: "{{ env_var('SNOWFLAKE_PASSWORD') }}"
      warehouse: "{{ env_var('SNOWFLAKE_WAREHOUSE') }}"
      database: "{{ env_var('SNOWFLAKE_DATABASE') }}"
      schema: analytics
      # Burla-specific defaults (all optional)
      burla_default_workers: 100
      burla_default_cpus_per_worker: 4
      # burla_cluster_url: https://cluster.burla.dev
      # burla_fake: true       # run Python models in-process (useful for local / CI)

Every knob your warehouse's own dbt-* adapter supports still works - dbt-burla is a subclass of the matching warehouse adapter.

Compatibility

dbt-core Python DuckDB Snowflake BigQuery
1.8.x 3.11 / 3.12 / 3.13
1.9.x 3.11 / 3.12 / 3.13

dbt Fusion (Rust) is tracked for a future release.

Documentation

Examples

Status

v0.x - API may change before v1.0. Follow the changelog for breaking changes.

Contributing

See CONTRIBUTING.md. Short version: make install && make test.

License

FSL-1.1-Apache-2.0. Source-available today, Apache 2.0 in two years.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dbt_burla-0.1.0.tar.gz (21.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dbt_burla-0.1.0-py3-none-any.whl (31.4 kB view details)

Uploaded Python 3

File details

Details for the file dbt_burla-0.1.0.tar.gz.

File metadata

  • Download URL: dbt_burla-0.1.0.tar.gz
  • Upload date:
  • Size: 21.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.5

File hashes

Hashes for dbt_burla-0.1.0.tar.gz
Algorithm Hash digest
SHA256 884c01c09d9c5bb188b055256b9e24352c67690b380d1be8aac1354a273735f3
MD5 1bdac357128a966d75190f55a2363a1a
BLAKE2b-256 28ccc22ff4d55b87ae674f0ca49e65bd6708c7fd3bab14249a54e1bba297b45c

See more details on using hashes here.

File details

Details for the file dbt_burla-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: dbt_burla-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 31.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.5

File hashes

Hashes for dbt_burla-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 50783357aab91608f301d46b0002e275fce281519ec166e1cd0aa5fb5451de83
MD5 5ba7e9c7a33561e4b6c3fb0405b6b62e
BLAKE2b-256 6391b7ee2c9bfdf38f6ccee8d456d81f7f194b89443362014ac0424c5a2b6814

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page