startColumnStatisticsTaskRun method
Starts a column statistics task run, for a specified table and columns.
May throw AccessDeniedException.
May throw ColumnStatisticsTaskRunningException.
May throw EntityNotFoundException.
May throw InvalidInputException.
May throw OperationTimeoutException.
May throw ResourceNumberLimitExceededException.
Parameter databaseName :
The name of the database where the table resides.
Parameter role :
The IAM role that the service assumes to generate statistics.
Parameter tableName :
The name of the table to generate statistics.
Parameter catalogID :
The ID of the Data Catalog where the table reside. If none is supplied,
the Amazon Web Services account ID is used by default.
Parameter columnNameList :
A list of the column names to generate statistics. If none is supplied,
all column names for the table will be used by default.
Parameter sampleSize :
The percentage of rows used to generate statistics. If none is supplied,
the entire table will be used to generate stats.
Parameter securityConfiguration :
Name of the security configuration that is used to encrypt CloudWatch logs
for the column stats task run.
Implementation
Future<StartColumnStatisticsTaskRunResponse> startColumnStatisticsTaskRun({
required String databaseName,
required String role,
required String tableName,
String? catalogID,
List<String>? columnNameList,
double? sampleSize,
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.StartColumnStatisticsTaskRun'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'DatabaseName': databaseName,
'Role': role,
'TableName': tableName,
if (catalogID != null) 'CatalogID': catalogID,
if (columnNameList != null) 'ColumnNameList': columnNameList,
if (sampleSize != null) 'SampleSize': sampleSize,
if (securityConfiguration != null)
'SecurityConfiguration': securityConfiguration,
},
);
return StartColumnStatisticsTaskRunResponse.fromJson(jsonResponse.body);
}