@Tags(value={"yaml","tree","record","reader","parser"}) @CapabilityDescription(value="Parses YAML into individual Record objects. While the reader expects each record to be well-formed YAML, the content of a FlowFile may consist of many records, each as a well-formed YAML array or YAML object. If an array is encountered, each element in that array will be treated as a separate record. If the schema that is configured contains a field that is not present in the YAML, a null value will be used. If the YAML contains a field that is not present in the schema, that field will be skipped. Please note this controller service does not support resolving the use of YAML aliases. Any alias present will be treated as a string. See the Usage of the Controller Service for more information and examples.") public class YamlTreeReader extends JsonTreeReader
Modifier and Type | Field and Description |
---|---|
private static boolean |
ALLOW_COMMENTS_DISABLED |
dateFormat, SCHEMA_APPLICATION_STRATEGY, schemaApplicationStrategy, STARTING_FIELD_NAME, STARTING_FIELD_STRATEGY, startingFieldName, startingFieldStrategy, timeFormat, timestampFormat
schemaAccessStrategy
Constructor and Description |
---|
YamlTreeReader() |
Modifier and Type | Method and Description |
---|---|
protected com.fasterxml.jackson.core.StreamReadConstraints |
buildStreamReadConstraints(ConfigurationContext context)
Build Stream Read Constraints based on available properties
|
protected RecordSourceFactory<com.fasterxml.jackson.databind.JsonNode> |
createJsonRecordSourceFactory() |
protected JsonTreeRowRecordReader |
createJsonTreeRowRecordReader(InputStream in,
ComponentLog logger,
RecordSchema schema) |
protected List<PropertyDescriptor> |
getSupportedPropertyDescriptors() |
protected boolean |
isAllowCommentsEnabled(ConfigurationContext context)
Determine whether to allow comments when parsing based on available properties
|
createRecordReader, getDefaultSchemaAccessStrategy, getSchemaAccessStrategy, getSchemaAccessStrategyValues, storePropertyValues
buildStrategyProperty, customValidate, getConfigurationContext, getSchema, getSchema, getSchemaAccessStrategy, getSchemaAcessStrategyDescriptor, getSuppliedSchemaFields, storeSchemaAccessStrategy
abstractClearConfigContext, abstractStoreConfigContext, disabled, enabled, getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, getProperty, getStateManager, init, initialize, isEnabled
equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, toString, validate
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
createRecordReader
initialize, isStateful
getIdentifier, getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate
private static final boolean ALLOW_COMMENTS_DISABLED
protected List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors
in class JsonTreeReader
protected RecordSourceFactory<com.fasterxml.jackson.databind.JsonNode> createJsonRecordSourceFactory()
createJsonRecordSourceFactory
in class JsonTreeReader
protected JsonTreeRowRecordReader createJsonTreeRowRecordReader(InputStream in, ComponentLog logger, RecordSchema schema) throws IOException, MalformedRecordException
createJsonTreeRowRecordReader
in class JsonTreeReader
IOException
MalformedRecordException
protected com.fasterxml.jackson.core.StreamReadConstraints buildStreamReadConstraints(ConfigurationContext context)
JsonTreeReader
buildStreamReadConstraints
in class JsonTreeReader
context
- Configuration Context with property valuesprotected boolean isAllowCommentsEnabled(ConfigurationContext context)
JsonTreeReader
isAllowCommentsEnabled
in class JsonTreeReader
context
- Configuration Context with property valuesCopyright © 2024 Apache NiFi Project. All rights reserved.