fal-ai / dbt-fal

do more with dbt. dbt-fal helps you run Python alongside dbt, so you can send Slack alerts, detect anomalies and build machine learning models.
https://fal.ai/dbt-fal
Apache License 2.0
853 stars 72 forks source link

feat(dbt-fal): add fal cloud context #788

Open mederka opened 1 year ago

mederka commented 1 year ago

Provides new cloud context, with store_open method that works like open but in cloud context.

def model(dbt, fal):
    from utils.get_bool import get_bool
    with fal.store_open("test", "w") as f:
        f.write("hello world")

    df = dbt.ref("model_b")

    df["my_bool"] = get_bool()
    return df