Interactive Exercise: Github Workflows

GitHub Analytics Team Simulator – dbt Collaboration Exercise

GitHub Analytics Team Simulator

Practice dbt collaboration workflows with your team

📋 Current Scenario: Morning Standup

Welcome to the Analytics Engineering team! You’ve just joined a team working on a dbt project for an e-commerce company. Today, you need to add a new revenue metric that Marketing requested. Let’s practice the full GitHub workflow!

👥 Team Members

Y
You
Analytics Engineer
S
Sarah Chen
Senior Analytics Engineer
M
Mike Johnson
Data Engineer
L
Lisa Park
Analytics Manager

🏆 Achievements

🌿
First Branch
Create your first feature branch
🔄
Stay Current
Merge main into your branch
💾
First Commit
Make your first commit
🔀
Pull Request Pro
Open your first pull request
👀
Code Reviewer
Review a teammate’s PR
Ship It!
Get your PR merged
💻
Terminal Master
Execute 10 git commands
📁 Repository
🔀 Pull Requests
⚙️ Workflow
💻 Terminal

📦 analytics-dbt-project

🌿 main
📁 models/staging/
📁 models/intermediate/
📁 models/marts/
📄 dbt_project.yml
📝 README.md

Quick Actions

Add customer segmentation model
#42 opened 2 hours ago by Sarah Chen • feature/customer-segments
needs review dbt tests passing
Update staging layer for new Shopify fields
#41 opened yesterday by Mike Johnson • fix/shopify-staging
WIP

📊 GitHub Workflow Steps

1️⃣
Create a Feature Branch
Branch from main: feature/marketing-roas
2️⃣
Sync with Main
Pull latest changes from main
3️⃣
Make Changes
Add int_campaign_roas.sql model
4️⃣
Commit Changes
Write clear commit message
5️⃣
Push to Remote
Push branch to GitHub
6️⃣
Open Pull Request
Create PR with description
7️⃣
Code Review
Get feedback from team
8️⃣
Merge to Main
Merge approved PR
Workflow Best Practices:
• Always sync with main before pushing
• Keep branches small and focused
• Write descriptive commit messages
• Request reviews from relevant team members
• Run dbt tests before pushing
• Update documentation with changes

📚 Terminal Workflow Guide

2
Create feature branch: git checkout -b feature/marketing-roas
Create and switch to a new branch for your work
3
Sync with main: git pull origin main
Get the latest changes from the main branch
4
Stage changes: git add .
Stage all your changes for commit
5
Commit: git commit -m "Add ROAS calculation"
Save your changes with a descriptive message
6
Push to GitHub: git push origin feature/marketing-roas
Upload your branch to GitHub
💡 Helpful Commands: Type help for all commands • clear to clear the terminal • git log to see commit history
Analytics dbt Project Terminal
=============================
🎯 Let’s start with checking your current status. Type: git status
$

🌿 Create New Branch

Create a feature branch for your new work. Follow the naming convention: feature/description

📝 Changes to Commit

1 — models/intermediate/int_campaign_roas.sql
2 + WITH campaign_spend AS (
3 + SELECT
4 + campaign_id,
5 + SUM(spend) as total_spend,
6 + SUM(revenue) as total_revenue
7 + FROM {{ ref(‘stg_marketing_campaigns’) }}
8 + GROUP BY campaign_id
9 + )
10 + SELECT
11 + *,
12 + ROUND(total_revenue / NULLIF(total_spend, 0), 2) as roas
13 + FROM campaign_spend

💾 Commit Changes

Write a clear commit message describing your changes:

🔀 Create Pull Request

Base: main Compare: feature/marketing-roas
ℹ️ Tip: Keep the section headers (##) below – they help reviewers understand your changes. Add your content under each header.