Giter VIP home page Giter VIP logo

dbt-fal-serverless-demo's Introduction

fal-serverless Example Project with dbt

This is an example project for running fal-serverlesss with dbt using the dbt-fal adapter. We will run a sentiment analysis model on some fake Zendesk data by building and running a Python model on fal-serverless on a GPU machine.

1. Pull the example repo

git clone [email protected]:fal-ai/dbt-fal-serverless-demo.git

2. Install fal-serverless and dbt-fal

pip install fal-serverless dbt-fal[snowflake]

3. Authenticate to fal-serverless

fal-serverless auth login

Follow the link that's generated and login using GitHub. Come back to the shell, when ready. (Reach out to the fal team for access if you don't already have it)

4. Generate keys to access fal-serverless

fal-serverless key generate

This will print a message containing values for KEY_ID and KEY_SECRET. We will need these for setting up the dbt profile.

5. Update your dbt profiles.yml

In order to run your Python models in fal-serverless, you should update the profiles.yml to include the newly generated credentials. Here's an example of how it should look like:

fal_profile:
  target: fal_serverless
  outputs:
    fal_serverless:
      type: fal
      db_profile: db
      host: <ask the fal team>
      key_secret: MY_KEY_SECRET_VALUE
      key_id: MY_KEY_ID_VALUE
    db:
      type: snowflake
      username: USERNAME
      password: PASSWORD

That's it. Doing a dbt run against this profile will execute your Python models in fal-serverless.

6. Run dbt

dbt seed will create the seed data. dbt run will run the SQL model and then run the Python model on fal Serverless on a GPU machine.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.