startDataQualityRuleRecommendationRun method

Future<StartDataQualityRuleRecommendationRunResponse> startDataQualityRuleRecommendationRun({
  1. required DataSource dataSource,
  2. required String role,
  3. String? clientToken,
  4. String? createdRulesetName,
  5. String? dataQualitySecurityConfiguration,
  6. int? numberOfWorkers,
  7. int? timeout,
})

Starts a recommendation run that is used to generate rules when you don't know what rules to write. Glue Data Quality analyzes the data and comes up with recommendations for a potential ruleset. You can then triage the ruleset and modify the generated ruleset to your liking.

Recommendation runs are automatically deleted after 90 days.

May throw ConflictException. 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 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 createdRulesetName : A name for the ruleset.

Parameter dataQualitySecurityConfiguration : The name of the security configuration created with the data quality encryption option.

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<StartDataQualityRuleRecommendationRunResponse>
    startDataQualityRuleRecommendationRun({
  required DataSource dataSource,
  required String role,
  String? clientToken,
  String? createdRulesetName,
  String? dataQualitySecurityConfiguration,
  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.StartDataQualityRuleRecommendationRun'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'DataSource': dataSource,
      'Role': role,
      if (clientToken != null) 'ClientToken': clientToken,
      if (createdRulesetName != null)
        'CreatedRulesetName': createdRulesetName,
      if (dataQualitySecurityConfiguration != null)
        'DataQualitySecurityConfiguration': dataQualitySecurityConfiguration,
      if (numberOfWorkers != null) 'NumberOfWorkers': numberOfWorkers,
      if (timeout != null) 'Timeout': timeout,
    },
  );

  return StartDataQualityRuleRecommendationRunResponse.fromJson(
      jsonResponse.body);
}