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

**********************
batch_delete_partition
**********************



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

  

  Deletes one or more partitions in a batch operation.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/BatchDeletePartition>`_  


  **Request Syntax**
  ::

    response = client.batch_delete_partition(
        CatalogId='string',
        DatabaseName='string',
        TableName='string',
        PartitionsToDelete=[
            {
                'Values': [
                    'string',
                ]
            },
        ]
    )
    
  :type CatalogId: string
  :param CatalogId: 

    The ID of the Data Catalog where the partition to be deleted 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 in question resides.

    

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

    The name of the table that contains the partitions to be deleted.

    

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

    A list of ``PartitionInput`` structures that define the partitions to be deleted.

    

  
    - *(dict) --* 

      Contains a list of values defining partitions.

      

    
      - **Values** *(list) --* **[REQUIRED]** 

        The list of values.

        

      
        - *(string) --* 

        
    
    

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

    
    ::

      {
          'Errors': [
              {
                  'PartitionValues': [
                      'string',
                  ],
                  'ErrorDetail': {
                      'ErrorCode': 'string',
                      'ErrorMessage': 'string'
                  }
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Errors** *(list) --* 

        The errors encountered when trying to delete the requested partitions.

        
        

        - *(dict) --* 

          Contains information about a partition error.

          
          

          - **PartitionValues** *(list) --* 

            The values that define the partition.

            
            

            - *(string) --* 
        
          

          - **ErrorDetail** *(dict) --* 

            The details about the partition 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`

  