Essential Elements of a PR Template for dbt Data Teams

Published
May 22, 2024
Author

What Should a PR Template for dbt Data Teams Include?

A PR template for dbt data teams should include sections that explain the reason for the PR, validate models, and provide post-merge instructions. It serves as a guide to help reviewers understand the changes and decide if it's safe to merge the PR.

  • Description and motivation: This section serves as an introduction that explains why the PR is being opened. It sets the scene and defines the intentions of the changes.
  • Screenshots: Relevant sections from the dependency graph (DAG) can be included here to visually represent the changes.
  • Validation of models: This part demonstrates that the model is doing what it's intended to do. It can include tests and checks to prove that intentions were realized.
  • Changes to existing models: Post-merge instructions are provided in this section to guide the team on what to do after the PR is merged.

What is the Role of a PR Comment Template in dbt Data Teams?

A PR comment template can include sections to set the scene, connect related information, explain the impact of changes, provide tests and checks, include alerts or items that need the reviewer's attention, and explain if anything needs to be done before merging. It helps in providing a comprehensive understanding of the changes made.

  • Set the scene and define intentions: This section helps in providing a context for the changes made.
  • Connect related information: Any related information or dependencies can be mentioned here to provide a holistic view of the changes.
  • Explain the impact of changes: The potential impact of the changes on the project can be explained in this section.
  • Provide tests and checks: Any tests or checks conducted to validate the changes can be mentioned here.
  • Include alerts or items that need the reviewer's attention: Any specific areas that require the reviewer's attention can be highlighted in this section.

Why is a Good Description Important in a PR Template?

A good description is best practice, even for a team of one. The description should be written in plain language so that the reviewer knows what to expect before looking at the code. It helps in setting the right expectations and provides a clear understanding of the changes made.

  • Clarity: A well-written description provides clarity about the changes made and their impact.
  • Expectation setting: It helps in setting the right expectations for the reviewer.
  • Understanding: A good description provides a clear understanding of the changes made, making the review process smoother.

Keep reading

See all