batchCreatePartition method
Creates one or more partitions in a batch operation.
May throw AlreadyExistsException.
May throw EntityNotFoundException.
May throw GlueEncryptionException.
May throw InternalServiceException.
May throw InvalidInputException.
May throw OperationTimeoutException.
May throw ResourceNumberLimitExceededException.
Parameter databaseName :
The name of the metadata database in which the partition is to be created.
Parameter partitionInputList :
A list of PartitionInput structures that define the
partitions to be created.
Parameter tableName :
The name of the metadata table in which the partition is to be created.
Parameter catalogId :
The ID of the catalog in which the partition is to be created. Currently,
this should be the Amazon Web Services account ID.
Implementation
Future<BatchCreatePartitionResponse> batchCreatePartition({
required String databaseName,
required List<PartitionInput> partitionInputList,
required String tableName,
String? catalogId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSGlue.BatchCreatePartition'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'DatabaseName': databaseName,
'PartitionInputList': partitionInputList,
'TableName': tableName,
if (catalogId != null) 'CatalogId': catalogId,
},
);
return BatchCreatePartitionResponse.fromJson(jsonResponse.body);
}