Giter VIP home page Giter VIP logo

dbt-labs / jaffle-shop-mesh-marketing Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 6.0 6.7 MB

A ✨ meshified ✨ open source sandbox project exploring dbt workflows via a fictional sandwich shop's data. This is a domain-focused node in the mesh focused on marketing models, built on the jaffle-shop-mesh-platform project.

Home Page: https://jaffleshop.com

analytics analytics-engineering data data-engineering dbt dbt-cloud

jaffle-shop-mesh-marketing's Introduction

🥪 The Jaffle Shop 🦘

Open in GitHub Codespaces Open in Gitpod

This is a sandbox project for exploring the basic functionality and latest features of dbt. This is part of a three project mesh with a finance project and a platform project that contains the upstream dependencies.

Create new repo from template

  1. Click the green "Use this template" button at the top of the page to create a new repository from this template.

    Click 'Use this template'

  2. Follow the steps to create a new repository.

Platform setup

dbt Cloud IDE (most beginner friendly)

  1. Set up a dbt Cloud account and follow Step 4 in the Quickstart instructions for your data platform, to connect your platform to dbt Cloud.
  2. Choose the repo you created in Step 1 as the repository for your dbt Project code.
  3. Click Develop in the top nav, you should be prompted to run a dbt deps, which you should do.

dbt Cloud in GitHub Codespaces / Gitpod (more customizable)

  1. In the new repository, click the green "Code" button and select "Open with Codespaces" from the dropdown. If possible, open in VSCode locally rather than the web version, performance is significantly better. You can also click the 'Open in Codespaces' badge at the top of the README, the 'Open in Gitpod' badge for a more expansive devcontainer experience.

    Create codespace on main

  2. Install the recommend extensions when prompted unless you have set preferences here.

  3. Run task install1 in the integrated terminal.

dbt Cloud locally (more advanced)

  1. If you have a preferred local development setup, clone the repo locally.
  2. Run task venv.2
  3. Run source .venv/bin/activate.3
  4. Run task install.1
  5. Run exec $SHELL4

Project setup

Once your project is set up, use the following steps to get the project ready for whatever you'd like to do with it.

dbt Cloud IDE

  1. Run dbt seed to load the sample data into your raw schema.
  2. Delete the jaffle-data directory now that the raw data is loaded into the warehouse.

dbt Cloud in Github Codespaces / Gitpod / local

  1. Run task setup.5
  2. Run a dbt build to build your project.
  3. Party up!

Optional

  • If you'd like to use pre-commit, run pre-commit install in your virtual environment or devcontainer, after the task install step.

Footnotes

  1. This will install the dbt Cloud CLI [currently in beta] as well as the python packages necessary for running MetricFlow queries, linting your code, and other tasks. 2

  2. This will create a virtual environment called .venv.

  3. This will activate the virtual environment you just created. It's a long story, but because task runs commands in a subshell, we need to activate the virtual environment in the main shell manually so we can't put this in a task, sorry!

  4. This will reload your shell and ensure the new dependencies are available.

  5. This will run a dbt seed then mv jaffle-data jaffle-data-loaded, moving the sample data out of the seed-path now that it's loaded into your raw schema. The raw schema is meant to be accessed by all developers and production jobs as a raw database would, so once you've dbt seed'd it, you don't need it again, but we'll keep it around in the jaffle-data-loaded folder just in case. Should you ever need to load it again just ensure you've dropped the raw schema and mv jaffle-data-loaded jaffle-data and then dbt seed again.

jaffle-shop-mesh-marketing's People

Contributors

gwenwindflower avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

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.