startDataQualityRulesetEvaluationRun method

Future<StartDataQualityRulesetEvaluationRunResponse> startDataQualityRulesetEvaluationRun({
  1. required DataSource dataSource,
  2. required String role,
  3. required List<String> rulesetNames,
  4. Map<String, DataSource>? additionalDataSources,
  5. DataQualityEvaluationRunAdditionalRunOptions? additionalRunOptions,
  6. String? clientToken,
  7. int? numberOfWorkers,
  8. int? timeout,
})

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.

May throw ConflictException. May throw EntityNotFoundException. May throw InternalServiceException. May throw InvalidInputException. May throw OperationTimeoutException.

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

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

Parameter rulesetNames : A list of ruleset names.

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

Parameter additionalRunOptions : Additional run options you can specify for an evaluation run.

Parameter clientToken : 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.

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

Parameter timeout : 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).

Implementation

Future<StartDataQualityRulesetEvaluationRunResponse>
    startDataQualityRulesetEvaluationRun({
  required DataSource dataSource,
  required String role,
  required List<String> rulesetNames,
  Map<String, DataSource>? additionalDataSources,
  DataQualityEvaluationRunAdditionalRunOptions? additionalRunOptions,
  String? clientToken,
  int? numberOfWorkers,
  int? timeout,
}) async {
  _s.validateNumRange(
    'timeout',
    timeout,
    1,
    1152921504606846976,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSGlue.StartDataQualityRulesetEvaluationRun'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'DataSource': dataSource,
      'Role': role,
      'RulesetNames': rulesetNames,
      if (additionalDataSources != null)
        'AdditionalDataSources': additionalDataSources,
      if (additionalRunOptions != null)
        'AdditionalRunOptions': additionalRunOptions,
      if (clientToken != null) 'ClientToken': clientToken,
      if (numberOfWorkers != null) 'NumberOfWorkers': numberOfWorkers,
      if (timeout != null) 'Timeout': timeout,
    },
  );

  return StartDataQualityRulesetEvaluationRunResponse.fromJson(
      jsonResponse.body);
}