Test Code Changes On Pull Requests
Last updated
Last updated
This template creates a Bolt schedule that automatically executes dbt™ model builds and tests when a new pull request is opened against your main branch. It builds and tests only the models affected by your code changes in a temporary schema, ensuring data quality before merging into production.
The template uses a single command optimized for pull request validation:
dbt build --select state:modified+ --target ci
: This builds only the models that have been modified in the pull request, along with their downstream dependencies, in the "ci" target environment.
Type: Scheduled Run (Cron)
Cron Schedule: OFF
(This schedule will be triggered by a new pull request event, not a cron schedule)
Email Alerts:
Success: Confirms models built and tested successfully
Failure: Alerts when models fail to build or tests fail
SLA Breach: Alerts if the run takes longer than 120 minutes
Tailor this template to your specific needs:
Adjust Deferred Schedule to the production schedule you want Turbo CI to compare against for state changes.
Hourly checks for frequent data updates (0 * * * *
)
Daily checks for standard reporting (0 0 * * *
)
Modify command settings with the dbt™ commands to suit your testing requirements, such as running specific model selectors or additional tests.
Add more notifications destinations (Slack, MS Teams) to match your team's workflows.
For custom Trigger configurations, see documentation.
For custom notification configurations, see documentation.
via the dbt generate_schema_name.sql
macro to handle the temporary schema prefix.
Schedule Type
Turbo CI
Enables automated validation of pull request changes.
Schedule Name
turbo ci run
A descriptive name indicating the purpose of the schedule
Deferred Schedule
hourly run
Specifies the production schedule to compare against for state changes.
Git Branch
main
Uses your default production branch to ensure correct code comparison.