Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

dbt app example

This project shows and example how to integrate a dbt and a Grouparoo project. The dbt models transform the data and the Grouparoo config syncs the result to a destination.

dbt and Grouparoo workflow

Get more details in the blog post.


First, install dbt following these installation instructions. For Mac:

brew update
brew install git
brew tap fishtown-analytics/dbt
brew install dbt

This example uses a Postgres database, though it also works with other data warehouses with the necessary SQL updates. Create one called app_example_dbt.

Next, you will need to teach dbt how to connect to your warehouse. In dbt, this lives in ~/.dbt/profiles.yml.

There is an example file checked into this repo as profiles.example.yml. Copy it to ~/.dbt/profiles.yml and edit as needed.

Now, let's seed some data. This will create a users and a purchases table in your Postgres database:

dbt seed

Now, we install Node.js for Grouparoo to use. This project has an .nvmrc file, so it will be in a v14 nvm instance if you use that. Otherwise, use Node.js version 12+.

cd grouparoo && npm install

Finally, let's set up the Grouparoo .env file. These can also be set in the system ENV.

cp grouparoo/.env.example grouparoo/.env

You will need to edit the following environment variables to real ones if you want it to sync to Mailchimp:



There is a script that runs both dbt and Grouparoo:


It is relatively simple if you want to do them separately:

dbt run
cd grouparoo && npm run sync


This project transforms the seeded users and purchases table into a few views:

  • customers view with roll ups of key properties
  • sync_mailchimp for the data we want to sync to Mailchimp


Handles syncing data to destinations, using Postgres as a warehouse.

It syncs customers' emails, first name, and lifetime value from the sync_mailchimp table.


Using Grouparoo in a dbt project




No packages published

Contributors 4