Links:

1. Create a fresh Python environment 💅

# Go to a working directory

$ python3.9 -m venv act1
$ source act1/bin/activate

$ cd act1 && mkdir src && cd src

2. Install dbt-duckdb 🦆 (Optionally dbt-snowflake ❄️)

$ pip install dbt-duckdb # dbt-snowflake

3. Pull dbt-core fork and dbt-fal adapter

# Install dbt-core fork
$ git clone <https://github.com/fal-ai/dbt-core.git>
$ cd dbt-core
$ git checkout act1
$ pip install -r dev-requirements.txt -r editable-requirements.txt

# Install dbt-fal
$ cd ..
$ git clone <https://github.com/fal-ai/fal.git>
$ cd fal
$ git checkout act1

# Install fal
$ pip install -e .

# Install dbt-fal
$ pip install -e "./adapter" # "./adapter[snowflake]" to run Snowflake

4. Update profiles.yml

$ vi ~/.dbt/profiles.yml

# Add a new output to the jaffle_shop profile and set it as the target

jaffle_shop:
  target: dev_with_fal
  outputs:
    # ...
    dev_with_fal:
      type: duckdb
      path: "/Users/{YOUR_USERNAME}/duck_db_dbt_dump.db" 
      # path has to be absolute, and the folder needs to exist
      python_adapter:
        type: fal

5. Pull jaffle_shop_with_fal

$ cd ..
$ git clone <https://github.com/fal-ai/jaffle_shop_with_fal.git>
$ cd jaffle_shop_with_fal
$ git checkout act1

<aside> ❗ At this point, make sure you are using the correct dbt version to ensure you are on 1.3.0b2 by dbt --version

</aside>

6. Run dbt seed and dbt run

$ dbt seed
$ dbt run

<aside> ❗ At this point, you will most likely get an error because you don’t have prophet installed yet. With dbt-fal, you dont have to manage your environments! Let’s look at how fal environments work:

</aside>

7. Define an environment in fal_project.ymland use it in your model!