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

*****************
update_classifier
*****************



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

  

  Modifies an existing classifier (a ``GrokClassifier``, an ``XMLClassifier``, a ``JsonClassifier``, or a ``CsvClassifier``, depending on which field is present).

  

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


  **Request Syntax**
  ::

    response = client.update_classifier(
        GrokClassifier={
            'Name': 'string',
            'Classification': 'string',
            'GrokPattern': 'string',
            'CustomPatterns': 'string'
        },
        XMLClassifier={
            'Name': 'string',
            'Classification': 'string',
            'RowTag': 'string'
        },
        JsonClassifier={
            'Name': 'string',
            'JsonPath': 'string'
        },
        CsvClassifier={
            'Name': 'string',
            'Delimiter': 'string',
            'QuoteSymbol': 'string',
            'ContainsHeader': 'UNKNOWN'|'PRESENT'|'ABSENT',
            'Header': [
                'string',
            ],
            'DisableValueTrimming': True|False,
            'AllowSingleColumn': True|False,
            'CustomDatatypeConfigured': True|False,
            'CustomDatatypes': [
                'string',
            ],
            'Serde': 'OpenCSVSerDe'|'LazySimpleSerDe'|'None'
        }
    )
    
  :type GrokClassifier: dict
  :param GrokClassifier: 

    A ``GrokClassifier`` object with updated fields.

    

  
    - **Name** *(string) --* **[REQUIRED]** 

      The name of the ``GrokClassifier``.

      

    
    - **Classification** *(string) --* 

      An identifier of the data format that the classifier matches, such as Twitter, JSON, Omniture logs, Amazon CloudWatch Logs, and so on.

      

    
    - **GrokPattern** *(string) --* 

      The grok pattern used by this classifier.

      

    
    - **CustomPatterns** *(string) --* 

      Optional custom grok patterns used by this classifier.

      

    
  
  :type XMLClassifier: dict
  :param XMLClassifier: 

    An ``XMLClassifier`` object with updated fields.

    

  
    - **Name** *(string) --* **[REQUIRED]** 

      The name of the classifier.

      

    
    - **Classification** *(string) --* 

      An identifier of the data format that the classifier matches.

      

    
    - **RowTag** *(string) --* 

      The XML tag designating the element that contains each record in an XML document being parsed. This cannot identify a self-closing element (closed by ``/>``). An empty row element that contains only attributes can be parsed as long as it ends with a closing tag (for example, ``<row item_a="A" item_b="B"></row>`` is okay, but ``<row item_a="A" item_b="B" />`` is not).

      

    
  
  :type JsonClassifier: dict
  :param JsonClassifier: 

    A ``JsonClassifier`` object with updated fields.

    

  
    - **Name** *(string) --* **[REQUIRED]** 

      The name of the classifier.

      

    
    - **JsonPath** *(string) --* 

      A ``JsonPath`` string defining the JSON data for the classifier to classify. Glue supports a subset of JsonPath, as described in `Writing JsonPath Custom Classifiers <https://docs.aws.amazon.com/glue/latest/dg/custom-classifier.html#custom-classifier-json>`__.

      

    
  
  :type CsvClassifier: dict
  :param CsvClassifier: 

    A ``CsvClassifier`` object with updated fields.

    

  
    - **Name** *(string) --* **[REQUIRED]** 

      The name of the classifier.

      

    
    - **Delimiter** *(string) --* 

      A custom symbol to denote what separates each column entry in the row.

      

    
    - **QuoteSymbol** *(string) --* 

      A custom symbol to denote what combines content into a single column value. It must be different from the column delimiter.

      

    
    - **ContainsHeader** *(string) --* 

      Indicates whether the CSV file contains a header.

      

    
    - **Header** *(list) --* 

      A list of strings representing column names.

      

    
      - *(string) --* 

      
  
    - **DisableValueTrimming** *(boolean) --* 

      Specifies not to trim values before identifying the type of column values. The default value is true.

      

    
    - **AllowSingleColumn** *(boolean) --* 

      Enables the processing of files that contain only one column.

      

    
    - **CustomDatatypeConfigured** *(boolean) --* 

      Specifies the configuration of custom datatypes.

      

    
    - **CustomDatatypes** *(list) --* 

      Specifies a list of supported custom datatypes.

      

    
      - *(string) --* 

      
  
    - **Serde** *(string) --* 

      Sets the SerDe for processing CSV in the classifier, which will be applied in the Data Catalog. Valid values are ``OpenCSVSerDe``, ``LazySimpleSerDe``, and ``None``. You can specify the ``None`` value when you want the crawler to do the detection.

      

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

    
    ::

      {}
      
    **Response Structure**

    

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

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

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

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

  