DataReviewBuilder#

class nominal.core.DataReviewBuilder(_integration_rids: list[str], _requests: list[data_review_pb2.CreateDataReviewRequest], _tags: list[str])#

Bases: object

Collect checklist executions and notification destinations before initiating reviews.

Obtain a builder with NominalClient.data_review_builder.

Example

Attach an existing Slack, Opsgenie, or webhook integration:

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: str | Integration) → DataReviewBuilder#

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

Parameters:

integration_rid – Integration RID or an Integration instance.

Returns:

This builder.

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 apply to every destination, including those already added.

add_tags(tags: list[str]) → DataReviewBuilder#
execute_checklist(run: str | Run, checklist: str | Checklist, *, commit: str | None = None, asset: str | Asset | None = None) → Self#

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

Parameters:
  • run – Instance or rid of the Run to run the Checklist on

  • checklist – Instance or rid of the checklist to execute on the Run

  • commit – Commit hash of the version of the checklist to run, or the latest version if None is provided

  • asset – 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 – 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.

initiate(wait_for_completion: bool = True) → Sequence[DataReview]#

Initiates a batch data review process.

Parameters:

wait_for_completion – 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.