updateColumnStatisticsTaskSettings method

Future<void> updateColumnStatisticsTaskSettings({
  1. required String databaseName,
  2. required String tableName,
  3. String? catalogID,
  4. List<String>? columnNameList,
  5. String? role,
  6. double? sampleSize,
  7. String? schedule,
  8. String? securityConfiguration,
})

Updates settings for a column statistics task.

May throw AccessDeniedException. May throw EntityNotFoundException. May throw InvalidInputException. May throw OperationTimeoutException. May throw VersionMismatchException.

Parameter databaseName : The name of the database where the table resides.

Parameter tableName : The name of the table for which to generate column statistics.

Parameter catalogID : The ID of the Data Catalog in which the database resides.

Parameter columnNameList : A list of column names for which to run statistics.

Parameter role : The role used for running the column statistics.

Parameter sampleSize : The percentage of data to sample.

Parameter schedule : A schedule for running the column statistics, specified in CRON syntax.

Parameter securityConfiguration : Name of the security configuration that is used to encrypt CloudWatch logs.

Implementation

Future<void> updateColumnStatisticsTaskSettings({
  required String databaseName,
  required String tableName,
  String? catalogID,
  List<String>? columnNameList,
  String? role,
  double? sampleSize,
  String? schedule,
  String? securityConfiguration,
}) async {
  _s.validateNumRange(
    'sampleSize',
    sampleSize,
    0,
    100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSGlue.UpdateColumnStatisticsTaskSettings'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'DatabaseName': databaseName,
      'TableName': tableName,
      if (catalogID != null) 'CatalogID': catalogID,
      if (columnNameList != null) 'ColumnNameList': columnNameList,
      if (role != null) 'Role': role,
      if (sampleSize != null) 'SampleSize': sampleSize,
      if (schedule != null) 'Schedule': schedule,
      if (securityConfiguration != null)
        'SecurityConfiguration': securityConfiguration,
    },
  );
}