Glue / Client / delete_database
delete_database#
- Glue.Client.delete_database(**kwargs)#
Removes a specified database from a Data Catalog.
Note
After completing this operation, you no longer have access to the tables (and all table versions and partitions that might belong to the tables) and the user-defined functions in the deleted database. Glue deletes these “orphaned” resources asynchronously in a timely manner, at the discretion of the service.
To ensure the immediate deletion of all related resources, before calling
DeleteDatabase
, useDeleteTableVersion
orBatchDeleteTableVersion
,DeletePartition
orBatchDeletePartition
,DeleteUserDefinedFunction
, andDeleteTable
orBatchDeleteTable
, to delete any resources that belong to the database.See also: AWS API Documentation
Request Syntax
response = client.delete_database( CatalogId='string', Name='string' )
- Parameters:
CatalogId (string) – The ID of the Data Catalog in which the database resides. If none is provided, the Amazon Web Services account ID is used by default.
Name (string) –
[REQUIRED]
The name of the database to delete. For Hive compatibility, this must be all lowercase.
- Return type:
dict
- Returns:
Response Syntax
{}
Response Structure
(dict) –
Exceptions
Glue.Client.exceptions.EntityNotFoundException
Glue.Client.exceptions.InvalidInputException
Glue.Client.exceptions.InternalServiceException
Glue.Client.exceptions.OperationTimeoutException
Glue.Client.exceptions.ConcurrentModificationException
Glue.Client.exceptions.FederationSourceException
Glue.Client.exceptions.FederationSourceRetryableException