:doc:`Glue <../../glue>` / Client / batch_delete_table

******************
batch_delete_table
******************



.. py:method:: Glue.Client.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 <https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/BatchDeleteTable>`_  


  **Request Syntax**
  ::

    response = client.batch_delete_table(
        CatalogId='string',
        DatabaseName='string',
        TablesToDelete=[
            'string',
        ],
        TransactionId='string'
    )
    
  :type CatalogId: string
  :param 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.

    

  
  :type DatabaseName: string
  :param DatabaseName: **[REQUIRED]** 

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

    

  
  :type TablesToDelete: list
  :param TablesToDelete: **[REQUIRED]** 

    A list of the table to delete.

    

  
    - *(string) --* 

    

  :type TransactionId: string
  :param TransactionId: 

    The transaction ID at which to delete the table contents.

    

  
  
  :rtype: 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**
  
  *   :py:class:`Glue.Client.exceptions.InvalidInputException`

  
  *   :py:class:`Glue.Client.exceptions.EntityNotFoundException`

  
  *   :py:class:`Glue.Client.exceptions.InternalServiceException`

  
  *   :py:class:`Glue.Client.exceptions.OperationTimeoutException`

  
  *   :py:class:`Glue.Client.exceptions.GlueEncryptionException`

  
  *   :py:class:`Glue.Client.exceptions.ResourceNotReadyException`

  