Class Classifier
- All Implemented Interfaces:
Serializable
,SdkPojo
,ToCopyableBuilder<Classifier.Builder,
Classifier>
Classifiers are triggered during a crawl task. A classifier checks whether a given file is in a format it can handle.
If it is, the classifier creates a schema in the form of a StructType
object that matches that data
format.
You can use the standard classifiers that Glue provides, or you can write your own classifiers to best categorize
your data sources and specify the appropriate schemas to use for them. A classifier can be a grok
classifier, an XML
classifier, a JSON
classifier, or a custom CSV
classifier,
as specified in one of the fields in the Classifier
object.
- See Also:
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Classifier.Builder
builder()
final CsvClassifier
A classifier for comma-separated values (CSV).final boolean
final boolean
equalsBySdkFields
(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final <T> Optional
<T> getValueForField
(String fieldName, Class<T> clazz) final GrokClassifier
A classifier that usesgrok
.final int
hashCode()
final JsonClassifier
A classifier for JSON content.static Class
<? extends Classifier.Builder> Take this object and create a builder that contains all of the current property values of this object.final String
toString()
Returns a string representation of this object.final XMLClassifier
A classifier for XML content.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
grokClassifier
A classifier that uses
grok
.- Returns:
- A classifier that uses
grok
.
-
xmlClassifier
A classifier for XML content.
- Returns:
- A classifier for XML content.
-
jsonClassifier
A classifier for JSON content.
- Returns:
- A classifier for JSON content.
-
csvClassifier
A classifier for comma-separated values (CSV).
- Returns:
- A classifier for comma-separated values (CSV).
-
toBuilder
Description copied from interface:ToCopyableBuilder
Take this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilder
in interfaceToCopyableBuilder<Classifier.Builder,
Classifier> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
public final int hashCode() -
equals
-
equalsBySdkFields
Description copied from interface:SdkPojo
Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojo
class, and is generated based on a service model.If an
SdkPojo
class does not have any inherited fields,equalsBySdkFields
andequals
are essentially the same.- Specified by:
equalsBySdkFields
in interfaceSdkPojo
- Parameters:
obj
- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value. -
getValueForField
-
sdkFields
-