batch_delete_table

batch_delete_table(**kwargs)

Deletes multiple tables at once.

Note

After completing this operation, you no longer have access to the table versions and partitions that belong to the deleted table. 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 BatchDeleteTable , use DeleteTableVersion or BatchDeleteTableVersion , and DeletePartition or BatchDeletePartition , to delete any resources that belong to the table.

See also: AWS API Documentation

Request Syntax

response = client.batch_delete_table(
    CatalogId='string',
    DatabaseName='string',
    TablesToDelete=[
        'string',
    ],
    TransactionId='string'
)
Parameters
  • CatalogId (string) -- The ID of the Data Catalog where the table resides. If none is provided, the Amazon Web Services account ID is used by default.
  • DatabaseName (string) --

    [REQUIRED]

    The name of the catalog database in which the tables to delete reside. For Hive compatibility, this name is entirely lowercase.

  • TablesToDelete (list) --

    [REQUIRED]

    A list of the table to delete.

    • (string) --
  • TransactionId (string) -- The transaction ID at which to delete the table contents.
Return type

dict

Returns

Response Syntax

{
    'Errors': [
        {
            'TableName': 'string',
            'ErrorDetail': {
                'ErrorCode': 'string',
                'ErrorMessage': 'string'
            }
        },
    ]
}

Response Structure

  • (dict) --

    • Errors (list) --

      A list of errors encountered in attempting to delete the specified tables.

      • (dict) --

        An error record for table operations.

        • TableName (string) --

          The name of the table. For Hive compatibility, this must be entirely lowercase.

        • ErrorDetail (dict) --

          The details about the error.

          • ErrorCode (string) --

            The code associated with this error.

          • ErrorMessage (string) --

            A message describing the error.

Exceptions

  • Glue.Client.exceptions.InvalidInputException
  • Glue.Client.exceptions.EntityNotFoundException
  • Glue.Client.exceptions.InternalServiceException
  • Glue.Client.exceptions.OperationTimeoutException
  • Glue.Client.exceptions.GlueEncryptionException
  • Glue.Client.exceptions.ResourceNotReadyException