deleteTable method
Removes a table definition from the Data Catalog.
To ensure the immediate deletion of all related resources, before calling
DeleteTable, use DeleteTableVersion or
BatchDeleteTableVersion, and DeletePartition or
BatchDeletePartition, to delete any resources that belong to
the table.
May throw ConcurrentModificationException.
May throw EntityNotFoundException.
May throw FederationSourceException.
May throw FederationSourceRetryableException.
May throw InternalServiceException.
May throw InvalidInputException.
May throw OperationTimeoutException.
May throw ResourceNotReadyException.
Parameter databaseName :
The name of the catalog database in which the table resides. For Hive
compatibility, this name is entirely lowercase.
Parameter name :
The name of the table to be deleted. For Hive compatibility, this name is
entirely lowercase.
Parameter catalogId :
The ID of the Data Catalog where the table resides. If none is provided,
the Amazon Web Services account ID is used by default.
Parameter transactionId :
The transaction ID at which to delete the table contents.
Implementation
Future<void> deleteTable({
required String databaseName,
required String name,
String? catalogId,
String? transactionId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSGlue.DeleteTable'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'DatabaseName': databaseName,
'Name': name,
if (catalogId != null) 'CatalogId': catalogId,
if (transactionId != null) 'TransactionId': transactionId,
},
);
}