Skip to main content

ExtractRecordSchema

Description

Extracts the record schema from the FlowFile using the supplied Record Reader and writes it to the avro.schema attribute.

Tags

avro, csv, freeform, generic, json, record, schema, text, xml

Properties

In the list below required Properties are shown with an asterisk (*). Other properties are considered optional. The table also indicates any default values, and whether a property supports the NiFi Expression Language.

Display NameAPI NameDefault ValueAllowable ValuesDescription
Record Reader *record-readerController Service:
RecordReaderFactory

Implementations:
AvroReader
CEFReader
CSVReader
ExcelReader
GrokReader
JsonPathReader
JsonTreeReader
ReaderLookup
ScriptedReader
Syslog5424Reader
SyslogReader
WindowsEventLogReader
XMLReader
YamlTreeReader
Specifies the Controller Service to use for reading incoming data
Schema Cache Size *cache-size10Specifies the number of schemas to cache. This value should reflect the expected number of different schemas that may be in the incoming FlowFiles. This ensures more efficient retrieval of the schemas and thus the processor performance.

Dynamic Properties

This component does not support dynamic properties.

Relationships

NameDescription
failureIf a FlowFile's record schema cannot be extracted from the configured input format, the FlowFile will be routed to this relationship
successFlowFiles whose record schemas are successfully extracted will be routed to this relationship

Reads Attributes

This processor does not read attributes.

Writes Attributes

NameDescription
avro.schemaThis attribute provides the schema extracted from the input FlowFile using the provided RecordReader.
record.error.messageThis attribute provides on failure the error message encountered by the Reader.

State Management

This component does not store state.

Restricted

This component is not restricted.

Input Requirement

This component requires an incoming relationship.

System Resource Considerations

This component does not specify system resource considerations.

See Also