batchGetPartition method
Retrieves partitions in a batch request.
May throw EntityNotFoundException.
May throw FederationSourceException.
May throw FederationSourceRetryableException.
May throw GlueEncryptionException.
May throw InternalServiceException.
May throw InvalidInputException.
May throw InvalidStateException.
May throw OperationTimeoutException.
Parameter databaseName :
The name of the catalog database where the partitions reside.
Parameter partitionsToGet :
A list of partition values identifying the partitions to retrieve.
Parameter tableName :
The name of the partitions' table.
Parameter catalogId :
The ID of the Data Catalog where the partitions in question reside. If
none is supplied, the Amazon Web Services account ID is used by default.
Implementation
Future<BatchGetPartitionResponse> batchGetPartition({
required String databaseName,
required List<PartitionValueList> partitionsToGet,
required String tableName,
AuditContext? auditContext,
String? catalogId,
QuerySessionContext? querySessionContext,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSGlue.BatchGetPartition'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'DatabaseName': databaseName,
'PartitionsToGet': partitionsToGet,
'TableName': tableName,
if (auditContext != null) 'AuditContext': auditContext,
if (catalogId != null) 'CatalogId': catalogId,
if (querySessionContext != null)
'QuerySessionContext': querySessionContext,
},
);
return BatchGetPartitionResponse.fromJson(jsonResponse.body);
}