Skip to main content

Simplest way to run dbt python models.

Project description

Welcome to dbt-fal 👋

dbt-fal adapter is the ✨easiest✨ way to run your dbt Python models.

Starting with dbt v1.3, you can now build your dbt models in Python. This leads to some cool use cases that was once difficult to build with SQL alone. Some examples are:

  • Using Python stats libraries to calculate stats
  • Building forecasts
  • Building other predictive models such as classification and clustering

This is fantastic! BUT, there is still one issue though! The developer experience with Snowflake and Bigquery is not great, and there is no Python support for Redshift and Postgres.

dbt-fal provides the best environment to run your Python models that works with all other data warehouses! With dbt-fal, you can:

  • Build and test your models locally
  • Isolate each model to run in its own environment with its own dependencies
  • [Coming Soon] Run your Python models in the ☁️ cloud ☁️ with elasticly scaling Python environments.
  • [Coming Soon] Even add GPUs to your models for some heavier workloads such as training ML models.

Getting Started

1. Install dbt-fal

pip install dbt-fal[bigquery, snowflake] Add your current warehouse here

2. Update your profiles.yml and add the fal adapter

jaffle_shop:
  target: dev_with_fal
  outputs:
    dev_with_fal:
      type: fal
      db_profile: dev_bigquery # This points to your main adapter
    dev_bigquery:
      type: bigquery
      ...

Don't forget to point to your main adapter with the db_profile attribute. This is how the fal adapter knows how to connect to your data warehouse.

3. dbt run!

That is it! It is really that simple 😊

4. [🚨 Cool Feature Alert 🚨] Environment management with dbt-fal

If you want some help with environment management (vs sticking to the default env that the dbt process runs in), you can create a fal_project.yml in the same folder as your dbt project and have “named environments”:

In your dbt project folder:

$ touch fal_project.yml

# Paste the config below
environments:
  - name: ml
    type: venv
    requirements:
      - prophet

and then in your dbt model:

$ vi models/orders_forecast.py

def model(dbt, fal):
    dbt.config(fal_environment="ml") # Add this line

    df: pd.DataFrame = dbt.ref("orders_daily")

The dbt.config(fal_environment=“ml”) will give you an isolated clean env to run things in, so you dont pollute your package space.

5. [Coming Soon™️] Move your compute to the Cloud!

Let us know if you are interested in this. We are looking for beta users.

Have feedback or need help?

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-fal-1.4.1.tar.gz (35.8 kB view details)

Uploaded Source

Built Distribution

dbt_fal-1.4.1-py3-none-any.whl (46.9 kB view details)

Uploaded Python 3

File details

Details for the file dbt-fal-1.4.1.tar.gz.

File metadata

  • Download URL: dbt-fal-1.4.1.tar.gz
  • Upload date:
  • Size: 35.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.8.16 Linux/5.15.0-1031-azure

File hashes

Hashes for dbt-fal-1.4.1.tar.gz
Algorithm Hash digest
SHA256 f9419409ccdb2e3c9e379f4377cf9ab7a3c7f3ed4e90ad9bbb3500c0d1fe054b
MD5 5a25a7fc8f4b4dd34185f5d40d4a517a
BLAKE2b-256 dfbc48a0c1bb920aed69e1ebb8f116c7f7debce871660345bab34aff31d2a5db

See more details on using hashes here.

File details

Details for the file dbt_fal-1.4.1-py3-none-any.whl.

File metadata

  • Download URL: dbt_fal-1.4.1-py3-none-any.whl
  • Upload date:
  • Size: 46.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.8.16 Linux/5.15.0-1031-azure

File hashes

Hashes for dbt_fal-1.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9b4aa8005f4590a41494aedd19eda8f894f17705afb91f6e1fd1848ab0e4aaf7
MD5 8fe4ac6518a1147c6285243dafee5b46
BLAKE2b-256 b404e7a56af32f2d74f8f7a903f4b6b9ad938648fefe1e34940aa87f9e312278

See more details on using hashes here.

Supported by

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