jaffle_gaggle is a fictional B2B product. This dbt project transforms raw data from an event stream & app database into a customer 360 view ready for operational analytics.

Inspired by dbt Labs' Jaffle Shop Repo.

What's in this repo?

This repo contains seeds that includes some (fake) raw data from a fictional app.

The raw data consists of tables:

  • raw_event
  • raw_user
  • raw_gaggle
  • merged_company_domain
  • merged_user

Running this project

To get up and running with this project:

  1. Install dbt using these instructions.

  2. Clone this repository.

  3. Change into the jaffle_gaggle directory from the command line:

$ cd jaffle_gaggle
  1. Set up a profile called jaffle_gaggle to connect to a data warehouse by following these instructions. If you have access to a data warehouse, you can use those credentials – we recommend setting your target schema to be a new schema (dbt will create the schema for you, as long as you have the right privileges). If you don't have access to an existing data warehouse, you can also setup a local postgres database and connect to it in your profile.

  2. Ensure your profile is setup correctly from the command line:

$ dbt debug
  1. Load the CSVs with the demo data set. This materializes the CSVs as tables in your target schema. Note that a typical dbt project does not require this step since dbt assumes your raw data is already in your warehouse.
$ dbt seed
  1. Run the models:
$ dbt run

NOTE: If this steps fails, it might mean that you need to make small changes to the SQL in the models folder to adjust for the flavor of SQL of your target database. Definitely consider this if you are using a community-contributed adapter.

  1. Test the output of the models:
$ dbt test
  1. Generate documentation for the project:
$ dbt docs generate
  1. View the documentation for the project:
$ dbt docs serve