Skip to content

jharris126/preppin-data-dbt

Repository files navigation

Preppin' Data with dbt

View the dbt docs generated by this project here!

About

What Is Preppin' Data?

Preppin' Data is a fun weekly data prep challenge designed to grow your data prep skills. Challenges are presented ever Wednesday and solutions via Tableau Prep are released the following Tuesday. Participants are encouraged to use any data prep tool of their choice and tweet their solution using #PreppinData.

Why dbt? And what is this project?

preppin-data-dbt attempts to create an easy to use dbt project using VS Code devcontainers and dbt-duckdb adapter to lower the barrier to entry of learning dbt as well as share my own code out in the open for others to learn from.

Getting Started

Running and Exploring This Project

Running With GitHub Codespaces

  1. Fork this repo
    Create a fork of this repo and navigate to your fork
  2. Create a codespace
    On the main page for your fork repo, click the big green "Code" button and select "Create codespace on master/main"
  3. Wait for codespace to build and launch
  4. Execute a dbt run
    The project will appear and a terminal window should be launch. Simply type dbt run and hit enter/return. The project will run, database will be created, and outcomes will appear in the terminal.
  5. Check output files
    All models in the models/solutions directory output .csv files in solution_outputs. Navigate to the solution_outputs directory and select one of the files to view its output.
  6. Generate, serve, and explore dbt docs
    In the terminal, exectue the command dbt docs generate. After that runs, execute dbt docs serve. A new browser tab or window should appear with the autogenerated dbt docs for this project. Click around and explore the dbt docs for your local fork of the project.

Running With Visual Studo Code & Docker Desktop

  1. Download & Install all Prerequisites
  2. Clone this repo to local
    Using command line or your git client of choice, clone this repo to a new folder on your local workstation.
  3. Start Visual Studo Code and launch in container
    Open the Visual Studio Code app and navigate to your newly cloned repository. Clock the green arrows in the bottom-left corner and select "Open Folder in Container".
  4. Wait for container to build and start
  5. Execute a dbt run
    The project will appear and a terminal window should be launch. Simply type dbt run and hit enter/return. The project will run, database will be created, and outcomes will appear in the terminal.
  6. Check output files
    All models in the models/solutions directory output .csv files in solution_outputs. Navigate to the solution_outputs directory and select one of the files to view its output.
  7. Generate, serve, and explore dbt docs
    In the terminal, exectue the command dbt docs generate. After that runs, execute dbt docs serve. A new browser tab or window should appear with the autogenerated dbt docs for this project. Click around and explore the dbt docs for your local fork of the project.

Adding Your Own Solutions & Documentation

  • Customizing Docs
    Most documentation in this repo is applicable to all, however, some are hard coded to my own GitHub repo or could be expanded upon.
    • Repointing solution_outputs file locations
      Navigate to solutions/schema.yml. Change links in description: key to point to your own git repo copy of the solution_outputs directory or delete this from the docs.
    • Editing models/overview.md
      This markdown file can be editing to customize the landing page for the autogenerated dbt docs for your project.
  • Adding Solutions
    • Learning from reading, exploreing, and running this repo is great, but using it as a launch point to participate in the weekly challenges is even better! Hop over to Preppin' Data's Blog Page to start solving challenges your way.

About

Preppin' Data using dbt

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published