@SupportsBatching @InputRequirement(value=INPUT_REQUIRED) @SideEffectFree @Tags(value={"record","generic","schema","json","csv","avro","freeform","text","xml"}) @WritesAttribute(attribute="record.error.message",description="This attribute provides on failure the error message encountered by the Reader.") @WritesAttribute(attribute="avro.schema",description="This attribute provides the schema extracted from the input FlowFile using the provided RecordReader.") @CapabilityDescription(value="Extracts the record schema from the FlowFile using the supplied Record Reader and writes it to the `avro.schema` attribute.") public class ExtractRecordSchema extends AbstractProcessor
| Modifier and Type | Field and Description |
|---|---|
private com.github.benmanes.caffeine.cache.LoadingCache<RecordSchema,String> |
avroSchemaTextCache |
(package private) static List<PropertyDescriptor> |
properties |
(package private) static PropertyDescriptor |
RECORD_READER |
(package private) static Relationship |
REL_FAILURE |
(package private) static Relationship |
REL_SUCCESS |
static String |
SCHEMA_ATTRIBUTE_NAME |
(package private) static PropertyDescriptor |
SCHEMA_CACHE_SIZE |
| Constructor and Description |
|---|
ExtractRecordSchema() |
| Modifier and Type | Method and Description |
|---|---|
Set<Relationship> |
getRelationships() |
protected List<PropertyDescriptor> |
getSupportedPropertyDescriptors() |
void |
onTrigger(ProcessContext context,
ProcessSession session) |
void |
setup(ProcessContext context) |
onTriggergetControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, init, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTruecustomValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitisStatefulgetPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validatepublic static final String SCHEMA_ATTRIBUTE_NAME
static final PropertyDescriptor RECORD_READER
static final PropertyDescriptor SCHEMA_CACHE_SIZE
static final Relationship REL_SUCCESS
static final Relationship REL_FAILURE
static final List<PropertyDescriptor> properties
private com.github.benmanes.caffeine.cache.LoadingCache<RecordSchema,String> avroSchemaTextCache
protected List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors in class AbstractConfigurableComponentpublic Set<Relationship> getRelationships()
getRelationships in interface ProcessorgetRelationships in class AbstractSessionFactoryProcessor@OnScheduled public void setup(ProcessContext context)
public void onTrigger(ProcessContext context, ProcessSession session) throws ProcessException
onTrigger in class AbstractProcessorProcessExceptionCopyright © 2023 Apache NiFi Project. All rights reserved.