Skip to content

Instantly share code, notes, and snippets.

@jgdwyer
Created October 26, 2021 03:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jgdwyer/93282e10615af3dbdb2a28e59289a90a to your computer and use it in GitHub Desktop.
Save jgdwyer/93282e10615af3dbdb2a28e59289a90a to your computer and use it in GitHub Desktop.
Set up instructions for dbt demo data in Snowflake data warehouse
  1. This will require a connection to a database. For this demo, I'll be using a Snowflake trial account. You can sign up for that here (no credit card required). You can also use a different database like postgresql. But configuration in later steps will be different.
  2. Create a new database and schema. For Snowflake you can run:
create database if not exists jaffle_shop;
create schema if not exists jaffle_shop.dbt_demo;
  1. Install dbt following the instructions here. I recommend installing dbt with pip into a Python virtual environment.
pip install dbt
  1. Clone the dbt jaffle_shop repo locally and change to the new directory
git clone https://github.com/dbt-labs/jaffle_shop.git
cd jaffle_shop
  1. Create a new profiles.yml file in your ~/.dbt/ directory
jaffle_shop:
  target: dev
  outputs:
    dev:
      type: snowflake
      account: <ACCOUNTNAME>
      user: <USERNAME>
      password: <PASSWORD>
      database: jaffle_shop
      warehouse: compute_wh
      schema: dbt_demo
  1. Run dbt debug to confirm that everything is set up. If it passes, you are good to go!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment