Snowflake-Labs/getting-started-with-dbt-on-snowflake
Python
Captured source
source ↗Snowflake-Labs/getting-started-with-dbt-on-snowflake
Description: Provides a getting started dbt project for dbt on Snowflake
Language: Python
License: Apache-2.0
Stars: 66
Forks: 1314
Open issues: 4
Created: 2025-04-14T22:50:42Z
Pushed: 2026-04-08T20:25:22Z
Default branch: main
Fork: no
Archived: no
README:
Getting Started with dbt Projects on Snowflake
Overview
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:
What's Included
Setup Scripts (setup/)
- `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.
dbt Project (tasty_bytes_dbt_demo/)
- 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.
CI/CD (.github/workflows/)
- `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.
Scheduling (schedules.sql)
Task definitions for running the dbt project on a schedule using Snowflake Tasks.
Quick Start
1. Fork this repository. 2. Run tasty_bytes_setup.sql in a Snowflake worksheet to create the environment and load source data. 3. Create a workspace in Snowsight connected to your fork. 4. Run dbt deps, then dbt run from the workspace.
Notability
notability 3.0/10Routine tutorial repo with low stars