dbt Development Process
1. Development
- Always work on a personal branch, never commit to
main - Use
dbt CloudIDE, a laptop, or both. On a laptop keep the samedbtversion asdbt Cloud(see the repoREADME.md)
2. Commits
- Refactor before enhancing when practical
- A pre-commit hook runs
sqlfluffon updated files. In the Cloud IDE use the Lint button. Bypass withgit commit --no-verify -m "<message>" - Prefix the commit message with the nature of the change: Bugfix, New feature, Refactoring, or a combination
3. Pull requests and review
- Raise the PR in GitHub targeting
main, with theLinearissue link in the description, and move the issue to In Review - Check the CI checks pass. Failures on incremental models are expected for now
- Post the PR in
#team-data-internaland get it reviewed - Pull
mainand resolve conflicts if another branch merged - Address review comments, get approval in GitHub, merge to
main
4. Deployment
- Delete your branch after the merge
- Make sure the
dbtjob is not running indbt Cloud - If needed, bump the
DBT_PROD_WHwarehouse size - For custom refreshes, edit and run the Prod Manual Instructions job
- Verify the data
- Scale
DBT_PROD_WHback to Medium. ASnowflaketask also reverts it daily at 21:00 UTC
Testing and validating
Bigger models use a 7-day lookback outside production. Two variables in dbt_project.yml change this:
dev_load_full: boolean, run with the full dataset. Defaultfalsedev_load_days: lookback window in days. Default7
dbt run -m <yourmodel> --full-refresh --vars 'dev_load_days: 365'
dbt run --full-refresh --vars 'dev_load_full: true'
Note
Both variables are ignored in production.