View the dbt docs generated by this project here!
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.
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.
- Fork this repo
Create a fork of this repo and navigate to your fork - Create a codespace
On the main page for your fork repo, click the big green "Code" button and select "Create codespace on master/main" - Wait for codespace to build and launch
- Execute a
dbt run
The project will appear and a terminal window should be launch. Simply typedbt run
and hit enter/return. The project will run, database will be created, and outcomes will appear in the terminal. - 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. - Generate, serve, and explore dbt docs
In the terminal, exectue the commanddbt docs generate
. After that runs, executedbt 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.
- Download & Install all Prerequisites
- Download & Install Docker Desktop
- Download & Install Visual Studio Code
- Install the "Remote - Containers" VS Code extension from the Extension Marketplace
- 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. - 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". - Wait for container to build and start
- Execute a
dbt run
The project will appear and a terminal window should be launch. Simply typedbt run
and hit enter/return. The project will run, database will be created, and outcomes will appear in the terminal. - 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. - Generate, serve, and explore dbt docs
In the terminal, exectue the commanddbt docs generate
. After that runs, executedbt 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.
- 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 indescription:
key to point to your own git repo copy of thesolution_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.
- Repointing solution_outputs file locations
- 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.