This repository contains an example dbt project for dbt Projects on Snowflake. It uses the fictitious Tasty Bytes food truck brand as sample data and walks through environment setup, data modeling, CI/CD, and scheduling — all running natively inside Snowflake.
This repository is based on these Snowflake tutorials:
tasty_bytes_setup.sql— Creates the warehouse, database, schemas, GitHub integration, network rules, and loads the Tasty Bytes source data from S3 into raw tables.ci_cd_setup.sql— Creates a GitHub Actions service user with OIDC authentication and optional network policies for CI/CD pipelines.
- Staging models — Views that clean and rename columns from raw source tables (orders, trucks, menus, locations, franchises, customer loyalty).
- Mart models — Tables that aggregate business metrics:
orders,customer_loyalty_metrics, andsales_metrics_by_location(Python model). - Custom macros — Schema name generation for multi-environment deployments (dev/prod).
- Generic tests — Reusable test for validating positive amounts.
incoming_pr.yml— Runs dbt checks against a dev environment when a PR is opened.pr_merged.yml— Deploys the dbt project to production when a PR is merged.
Task definitions for running the dbt project on a schedule using Snowflake Tasks.
- Fork this repository.
- Run
tasty_bytes_setup.sqlin a Snowflake worksheet to create the environment and load source data. - Create a workspace in Snowsight connected to your fork.
- Run
dbt deps, thendbt runfrom the workspace.