Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 25 additions & 18 deletions docs/6-collaboration/checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,49 @@
title: Checklist
---

## What's Checklist
# Checklist

Save your validation checks to the Recce checklist with a description of your findings.
Save validation checks to track your findings and share them with reviewers. The checklist becomes your proof-of-correctness for modeling changes.

These checks can later be added to your pull request comment as proof-of-correctness for your modeling changes.
## How It Works

When you run a diff or query in Recce, you can add the result to your checklist. Each check captures:

- The validation type (schema diff, row count, query, etc.)
- The result at the time of capture
- Your notes explaining what the result means

<figure markdown>
![Recce Checklist](../assets/images/6-collaboration/checklist.png)
<figcaption>Checklist</figcaption>
<figcaption>Checklist with saved validation checks</figcaption>
</figure>

### Adding Checks

## Diffs performed via the Explore Change dropdown menu

For the majority of diffs, which are performed via the Explore Change dropdown menu, the Check can be added by clicking the Add to Checklist button in the results panel:
For diffs performed via the Explore Change dropdown menu, click **Add to Checklist** in the results panel:

<figure markdown>
![Add a Check by clicking the Add to Checklist button in the diff results panel](../assets/images/6-collaboration/add-to-checklist-button.png){: .shadow}
<figcaption>Add a Check by clicking the Add to Checklist button in the diff results panel</figcaption>
<figcaption>Add to Checklist button in diff results panel</figcaption>
</figure>

An example performing a Top-K diff and adding the results to the Checklist:

<figure markdown>
![Example adding a Top-K Diff to the Checklist](../assets/images/6-collaboration/add-to-checklist.gif){: .shadow}
<figcaption>Example adding a Top-K Diff to the Checklist</figcaption>
<figcaption>Example: Adding a Top-K Diff to the Checklist</figcaption>
</figure>

## Add to Checklist
### Re-running Checks

After making additional changes to your models, re-run checks from the checklist to verify your updates. This lets you iterate until all validations pass.

The Recce Checklist provides a way to record the results of a data check during change exploration. The purpose of adding Checks to the Checklist is to enable you to:
## When to Use

- Save Checks with notes of your interpretation of the data
- Re-run checks following further data modeling changes
- Share Checks as part of PR or stakeholder review
- **During development** - Save checks as you validate each change, building evidence as you go
- **Before creating a PR** - Compile all validations that prove your changes are correct
- **For recurring validations** - Use [Preset Checks](preset-checks.md) to automate checks that should run on every PR
- **Stakeholder review** - [Share](share.md) your checklist to give reviewers full context

## Preset Check
## Related

Preset checks can be the fixed checks that are generated every time a new Recce instance is initiated.
- [Preset Checks](preset-checks.md) - Automate recurring validation checks
- [Share](share.md) - Share your checklist with reviewers
115 changes: 115 additions & 0 deletions docs/6-collaboration/preset-checks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
---
title: Preset Checks
---

# Preset Checks

Define validation checks that run automatically for every PR. Preset checks ensure consistent validation across your team.

**Goal:** Configure recurring checks that execute automatically when Recce runs.

## Prerequisites

- [x] Recce installed in your dbt project
- [x] At least one check you want to automate

## Configure a Preset Check

### 1. Create a Check Template

Start by adding a check to your checklist manually:

1. Run a diff or query in Recce
2. Add the result to your checklist

![Add check to checklist](../assets/images/7-cicd/preset-checks-prep.png){: .shadow}

3. Open the check menu and select **Get Preset Check Template**
4. Copy the YAML config from the dialog

![Get preset check template](../assets/images/7-cicd/preset-checks-template.png){: .shadow}

### 2. Add to recce.yml

Paste the config into `recce.yml` at your project root:

```yaml
# recce.yml
checks:
- name: Query diff of customers
description: |
This is the demo preset check.

Please run the query and paste the screenshot to the PR comment.
type: query_diff
params:
sql_template: select * from {{ ref("customers") }}
view_options:
primary_keys:
- customer_id
```

## Running Preset Checks

### In Recce Server

When you launch Recce, preset checks appear in your checklist automatically (but not yet executed):

![Preset checks in checklist](../assets/images/7-cicd/preset-checks.png){: .shadow}

Click **Run Query** to execute each check.

### With recce run

Execute all preset checks from the command line:

```bash
recce run
```

Output:
```
───────────────────────────────── DBT Artifacts ─────────────────────────────────
Base:
Manifest: 2024-04-10 08:54:41.546402+00:00
Catalog: 2024-04-10 08:54:42.251611+00:00
Current:
Manifest: 2024-04-22 03:24:11.262489+00:00
Catalog: 2024-04-10 06:15:13.813125+00:00
───────────────────────────────── Preset checks ─────────────────────────────────
Recce Preset Checks
──────────────────────────────────────────────────────────────────────────────
Status Name Type Execution Time Failed Reason
──────────────────────────────────────────────────────────────────────────────
[Success] Query of customers Query Diff 0.10 seconds N/A
──────────────────────────────────────────────────────────────────────────────
The state file is stored at [recce_state.json]
```

View results by launching the server with the state file:

```bash
recce server recce_state.json
```

## Verification

Confirm preset checks work:

1. Add a check config to `recce.yml`
2. Run `recce run`
3. Verify the check appears in output with `[Success]` status
4. Launch `recce server recce_state.json` and confirm the check appears in your checklist

## Troubleshooting

| Issue | Solution |
|-------|----------|
| Check not appearing | Verify `recce.yml` is in project root and YAML syntax is valid |
| Check fails to run | Check that the SQL template references valid models |
| Wrong results | Ensure base and current artifacts are up to date |

## Related

- [Checklist](checklist.md) - Manually add checks during development
- [Configuration](../8-technical-concepts/configuration.md) - Full recce.yml reference
Loading