create_classifier
(**kwargs)¶Creates a classifier in the user's account. This can be a GrokClassifier
, an XMLClassifier
, a JsonClassifier
, or a CsvClassifier
, depending on which field of the request is present.
See also: AWS API Documentation
Request Syntax
response = client.create_classifier(
GrokClassifier={
'Classification': 'string',
'Name': 'string',
'GrokPattern': 'string',
'CustomPatterns': 'string'
},
XMLClassifier={
'Classification': 'string',
'Name': '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',
]
}
)
A GrokClassifier
object specifying the classifier to create.
An identifier of the data format that the classifier matches, such as Twitter, JSON, Omniture logs, Amazon CloudWatch Logs, and so on.
The name of the new classifier.
The grok pattern used by this classifier.
Optional custom grok patterns used by this classifier.
An XMLClassifier
object specifying the classifier to create.
An identifier of the data format that the classifier matches.
The name of the classifier.
The XML tag designating the element that contains each record in an XML document being parsed. This can't 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).
A JsonClassifier
object specifying the classifier to create.
The name of the classifier.
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.
A CsvClassifier
object specifying the classifier to create.
The name of the classifier.
A custom symbol to denote what separates each column entry in the row.
A custom symbol to denote what combines content into a single column value. Must be different from the column delimiter.
Indicates whether the CSV file contains a header.
A list of strings representing column names.
Specifies not to trim values before identifying the type of column values. The default value is true.
Enables the processing of files that contain only one column.
Enables the configuration of custom datatypes.
Creates a list of supported custom datatypes.
dict
Response Syntax
{}
Response Structure
Exceptions
Glue.Client.exceptions.AlreadyExistsException
Glue.Client.exceptions.InvalidInputException
Glue.Client.exceptions.OperationTimeoutException