# DataReviewBuilder

## class nominal.core.DataReviewBuilder

Bases: [`object`](https://docs.python.org/3/builtins/functions.html#object "(in Python v3.15)")

Collect checklist executions and notification destinations before initiating reviews.

Obtain a builder with [`NominalClient.data_review_builder`](https://dev.nominal.io/python/ref/generated/nominal.core.NominalClient.md#nominal.core.NominalClient.data_review_builder "nominal.core.NominalClient.data_review_builder").

Example

Attach an existing Slack, Opsgenie, or webhook integration:

```python
integration = client.get_integration("integration-rid")
reviews = (
    client.data_review_builder()
    .execute_checklist("run-rid", "checklist-rid")
    .add_integration(integration)
    .initiate()
)
```

### add_integration(integration_rid)

Add a notification destination for the reviews initiated by this builder.

Parameters:
:   **integration_rid** ([*str*](https://docs.python.org/3/builtins/stdtypes.html#str "(in Python v3.15)") *|* [*Integration*](https://dev.nominal.io/python/ref/generated/nominal.core.Integration.md#nominal.core.Integration "nominal.core.Integration"))

    Integration RID or an [`Integration`](https://dev.nominal.io/python/ref/generated/nominal.core.Integration.md#nominal.core.Integration "nominal.core.Integration") instance.

Returns:
:   This builder.

Return type:
:   [*DataReviewBuilder*](https://dev.nominal.io/python/ref/generated/nominal.core.DataReviewBuilder.md#nominal.core.DataReviewBuilder "nominal.core.DataReviewBuilder")

> **Note**
>
> Data review notifications support Slack, Opsgenie, generic webhooks, and secure webhooks.
> Teams and PagerDuty are unsupported. This method does not check whether the destination is supported.
>
> Tags added with [`add_tags`](https://dev.nominal.io/python/ref/generated/nominal.core.DataReviewBuilder.md#nominal.core.DataReviewBuilder.add_tags "nominal.core.DataReviewBuilder.add_tags") apply to every destination, including those already added.

### add_tags(tags)

Return type:
:   [*DataReviewBuilder*](https://dev.nominal.io/python/ref/generated/nominal.core.DataReviewBuilder.md#nominal.core.DataReviewBuilder "nominal.core.data_review.DataReviewBuilder")

### execute_checklist(run, checklist, *, commit=None, asset=None)

Add a request to create a data review for the given checklist and run.

Parameters:
:   - **run** ([*str*](https://docs.python.org/3/builtins/stdtypes.html#str "(in Python v3.15)") *|* [*Run*](https://dev.nominal.io/python/ref/generated/nominal.core.Run.md#nominal.core.Run "nominal.core.Run"))

      Instance or rid of the Run to run the Checklist on
    - **checklist** ([*str*](https://docs.python.org/3/builtins/stdtypes.html#str "(in Python v3.15)") *|* [*Checklist*](https://dev.nominal.io/python/ref/generated/nominal.core.Checklist.md#nominal.core.Checklist "nominal.core.Checklist"))

      Instance or rid of the checklist to execute on the Run
    - **commit** ([*str*](https://docs.python.org/3/builtins/stdtypes.html#str "(in Python v3.15)") *|* *None*)

      Commit hash of the version of the checklist to run, or the latest version if None is provided
    - **asset** ([*str*](https://docs.python.org/3/builtins/stdtypes.html#str "(in Python v3.15)") *|* [*Asset*](https://dev.nominal.io/python/ref/generated/nominal.core.Asset.md#nominal.core.Asset "nominal.core.Asset") *|* *None*)

      Instance or rid of the asset to run the checklist on within the Run.

      **Note:** Only required for multi-asset runs.

Returns:
:   DataReviewBuilder instance to continue building a data review with

Raises:
:   [**ValueError**](https://docs.python.org/3/builtins/exceptions.html#ValueError "(in Python v3.15)") – If the given run has multiple associated assets and no asset was specified, or
    if the run has an asset that differs from the provided asset.

Return type:
:   *Self*

### initiate(wait_for_completion=True)

Initiates a batch data review process.

Parameters:
:   **wait_for_completion** ([*bool*](https://docs.python.org/3/builtins/functions.html#bool "(in Python v3.15)"))

    If True, waits for the data review process to complete before returning.

Returns:
:   The initiated reviews, which may still be running unless wait_for_completion is True.
    Waiting for review completion does not wait for or confirm notification delivery.

Return type:
:   [*Sequence*](https://docs.python.org/3/library/typing.html#typing.Sequence "(in Python v3.15)")[[*DataReview*](https://dev.nominal.io/python/ref/generated/nominal.core.DataReview.md#nominal.core.DataReview "nominal.core.data_review.DataReview")]
