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

************
delete_table
************



.. py:method:: Glue.Client.delete_table(**kwargs)

  

  Removes a table definition from the Data Catalog.

   

  .. 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 ``DeleteTable``, 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/DeleteTable>`_  


  **Request Syntax**
  ::

    response = client.delete_table(
        CatalogId='string',
        DatabaseName='string',
        Name='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 table resides. For Hive compatibility, this name is entirely lowercase.

    

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

    The name of the table to be deleted. For Hive compatibility, this name is entirely lowercase.

    

  
  :type TransactionId: string
  :param TransactionId: 

    The transaction ID at which to delete the table contents.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`Glue.Client.exceptions.EntityNotFoundException`

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

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

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

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

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

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

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

  