PR Success Playbook for Analytics Engineers
Learn best practices for dbt pull requests, including naming conventions, folder structures, testing methodologies, and reviewer etiquette for data teams.
How to Make Reviewers Approve Your PR
(And keep your soul intact)
Based on the guide by Miriam Revilla Alvarez
The Roadmap to Green Checks โ
๐ Empathy: Why are reviewers like this?
๐ Best Practices: Rules of the Road
๐งช Testing: Prove it works on *not* your machine
๐คฉ Etiquette: How to keep us happy
๐ฎ KAHOOT: The Ultimate Showdown
The Reviewer's Perspective
We aren't gatekeepers just for fun.
We feel RESPONSIBLE if something breaks in Prod.
We want you to MERGE! It clears our backlog.
Naming Conventions: The 'Must Haves'
stg_ โ Staging models
prep_ โ Preparation models
event_ โ Curated event data (e.g., event_orders)
WHY? It reduces cognitive load. We don't want to play detective to figure out what data is in your table.
Folder Structure = Ownership
central_ops_team / staffing / shifts / curated / hub_shifts.sql
Don't just dump files in /models/new_stuff/. The folder path tells us who fixes it when it breaks at 3 AM.
Documentation: No Creative Writing!
The {% docs %} name MUST match the field name.
โ Bad: "This field is about user cool stuff."
โ Good: "TRUE if user has premium status. Updated daily."
Does it work? Or do you just HOPE it works?
1. Run .yml tests locally (unique, not_null).
2. Validate Business Logic (counts, sums, nulls).
3. Compare Dev vs Prod methods.
The 'To Test' Section is NOT Optional! ๐๏ธ
Show your intent. Paste the queries you ran. Convenience implies competence.
โ Confirmation .yml tests pass โ Queries that show records are correctly flagged โ Explaining why row counts changed
Keeping Reviewers Happy ๐คฉ
DO: Reply to comments explaining your fix.
DON'T: Resolve the comment yourself. That's the reviewer's job! ๐ก
DO: Fix the pattern everywhere, not just on the one line commented.
Be a Great PR Citizen
๐ฃ Post in #data-analytics-community when ready.
๐๏ธ Include 'dbt build' commands to reproduce logic.
๐ Don't make changes while we are reviewing!
KAHOOT TIME! ๐ฎ
Q1: Who resolves a PR comment? A) You B) The Reviewer (Correct) C) The CEO
Q2: Where does hub_shifts.sql live? A) on_my_desktop B) central_ops_team (Correct)
Q3: What goes in the 'To Test' section? A) 'It works trust me' B) Targeted validation queries (Correct)
Q4: Prefix for curated event models? A) evt_ B) event_ (Correct) C) stg_
- analytics-engineering
- dbt
- pull-request
- code-review
- data-modeling
- best-practices
- sql-testing








