Skip to content

start_data_quality_ruleset_evaluation_run

start_data_quality_ruleset_evaluation_run(
    data_source: DataSource,
    role: RoleString,
    ruleset_names: RulesetNames,
    *,
    config_overrides: Optional[GlueClientConfig] = None,
    number_of_workers: Optional[NullableInteger] = None,
    timeout: Optional[Timeout] = None,
    client_token: Optional[HashString] = None,
    additional_run_options: Optional[
        DataQualityEvaluationRunAdditionalRunOptions
    ] = None,
    additional_data_sources: Optional[DataSourceMap] = None,
) -> StartDataQualityRulesetEvaluationRunResponse

Once you have a ruleset definition (either recommended or your own), you call this operation to evaluate the ruleset against a data source (Glue table). The evaluation computes results which you can retrieve with the GetDataQualityResult API.

Parameters:

  • data_source (DataSource) –

    The data source (Glue table) associated with this run.

  • role (RoleString) –

    An IAM role supplied to encrypt the results of the run.

  • number_of_workers (Optional[NullableInteger], default: None ) –

    The number of G.1X workers to be used in the run. The default is 5.

  • timeout (Optional[Timeout], default: None ) –

    The timeout for a run in minutes. This is the maximum time that a run can consume resources before it is terminated and enters TIMEOUT status. The default is 2,880 minutes (48 hours).

  • client_token (Optional[HashString], default: None ) –

    Used for idempotency and is recommended to be set to a random ID (such as a UUID) to avoid creating or starting multiple instances of the same resource.

  • additional_run_options (Optional[DataQualityEvaluationRunAdditionalRunOptions], default: None ) –

    Additional run options you can specify for an evaluation run.

  • ruleset_names (RulesetNames) –

    A list of ruleset names.

  • additional_data_sources (Optional[DataSourceMap], default: None ) –

    A map of reference strings to additional data sources you can specify for an evaluation run.

Raises:

Source code in docs_src/capo_glue/_services/glue.py
def start_data_quality_ruleset_evaluation_run(
    self,
    data_source: "capo_glue.types.data_source.DataSource",
    role: "capo_glue.types.role_string.RoleString",
    ruleset_names: "capo_glue.types.ruleset_names.RulesetNames",
    *,
    config_overrides: Optional[GlueClientConfig] = None,
    number_of_workers: Optional[
        "capo_glue.types.nullable_integer.NullableInteger"
    ] = None,
    timeout: Optional["capo_glue.types.timeout.Timeout"] = None,
    client_token: Optional["capo_glue.types.hash_string.HashString"] = None,
    additional_run_options: Optional[
        "capo_glue.types.data_quality_evaluation_run_additional_run_options.DataQualityEvaluationRunAdditionalRunOptions"
    ] = None,
    additional_data_sources: Optional[
        "capo_glue.types.data_source_map.DataSourceMap"
    ] = None,
) -> "capo_glue.types.start_data_quality_ruleset_evaluation_run_response.StartDataQualityRulesetEvaluationRunResponse":
    """<p>Once you have a ruleset definition (either recommended or your own), you call this operation to evaluate the ruleset against a data source (Glue table). The evaluation computes results which you can retrieve with the <code>GetDataQualityResult</code> API.</p>

    Args:
        data_source: <p>The data source (Glue table) associated with this run.</p>
        role: <p>An IAM role supplied to encrypt the results of the run.</p>
        number_of_workers: <p>The number of <code>G.1X</code> workers to be used in the run. The default is 5.</p>
        timeout: <p>The timeout for a run in minutes. This is the maximum time that a run can consume resources before it is terminated and enters <code>TIMEOUT</code> status. The default is 2,880 minutes (48 hours).</p>
        client_token: <p>Used for idempotency and is recommended to be set to a random ID (such as a UUID) to avoid creating or starting multiple instances of the same resource.</p>
        additional_run_options: <p>Additional run options you can specify for an evaluation run.</p>
        ruleset_names: <p>A list of ruleset names.</p>
        additional_data_sources: <p>A map of reference strings to additional data sources you can specify for an evaluation run.</p>

    Raises:
        capo_glue.errors.conflict_exception.ConflictException: <p>The <code>CreatePartitions</code> API was called on a table that has indexes enabled. </p>
        capo_glue.errors.entity_not_found_exception.EntityNotFoundException: <p>A specified entity does not exist</p>
        capo_glue.errors.internal_service_exception.InternalServiceException: <p>An internal service error occurred.</p>
        capo_glue.errors.invalid_input_exception.InvalidInputException: <p>The input provided was not valid.</p>
        capo_glue.errors.operation_timeout_exception.OperationTimeoutException: <p>The operation timed out.</p>
        capo_glue.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_glue.types.start_data_quality_ruleset_evaluation_run_request.StartDataQualityRulesetEvaluationRunRequest]",
    ) -> OperationResponse[
        "capo_glue.types.start_data_quality_ruleset_evaluation_run_response.StartDataQualityRulesetEvaluationRunResponse"
    ]:
        import capo_glue._operations.aws_glue.start_data_quality_ruleset_evaluation_run

        output, http_response = (
            capo_glue._operations.aws_glue.start_data_quality_ruleset_evaluation_run.start_data_quality_ruleset_evaluation_run(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StartDataQualityRulesetEvaluationRun")
    )
    input_: capo_glue.types.start_data_quality_ruleset_evaluation_run_request.StartDataQualityRulesetEvaluationRunRequest = {
        "data_source": data_source,
        "role": role,
        "ruleset_names": ruleset_names,
    }
    if number_of_workers is not None:
        input_["number_of_workers"] = number_of_workers
    if timeout is not None:
        input_["timeout"] = timeout
    if client_token is not None:
        input_["client_token"] = client_token
    if additional_run_options is not None:
        input_["additional_run_options"] = additional_run_options
    if additional_data_sources is not None:
        input_["additional_data_sources"] = additional_data_sources

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output