JoinEnrichment 2.3.0¶

BUNDLE¶

org.apache.nifi | nifi-standard-nar

DESCRIPTION¶

Joins together Records from two different FlowFiles where one FlowFile, the ‘original’ contains arbitrary records and the second FlowFile, the ‘enrichment’ contains additional data that should be used to enrich the first. See Additional Details for more information on how to configure this processor and the different use cases that it aims to accomplish.

TAGS¶

combine, enrichment, fork, join, merge, record, recordpath, sql, streams, wrap

INPUT REQUIREMENT¶

REQUIRED

Supports Sensitive Dynamic Properties¶

false

PROPERTIES¶

Property

Description

Enrichment Record Reader

The Record Reader for reading the ‘enrichment’ FlowFile

Insertion Record Path

Specifies where in the ‘original’ Record the ‘enrichment’ Record’s fields should be inserted. Note that if the RecordPath does not point to any existing field in the original Record, the enrichment will not be inserted.

Join Strategy

Specifies how to join the two FlowFiles into a single FlowFile

Maximum number of Bins

Specifies the maximum number of bins that can be held in memory at any one time

Original Record Reader

The Record Reader for reading the ‘original’ FlowFile

Record Writer

The Record Writer to use for writing the results. If the Record Writer is configured to inherit the schema from the Record, the schema that it will inherit will be the result of merging both the ‘original’ record schema and the ‘enrichment’ record schema.

SQL

The SQL SELECT statement to evaluate. Expression Language may be provided, but doing so may result in poorer performance. Because this Processor is dealing with two FlowFiles at a time, it’s also important to understand how attributes will be referenced. If both FlowFiles have an attribute with the same name but different values, the Expression Language will resolve to the value provided by the ‘enrichment’ FlowFile.

Timeout

Specifies the maximum amount of time to wait for the second FlowFile once the first arrives at the processor, after which point the first FlowFile will be routed to the ‘timeout’ relationship.

dbf-default-precision

When a DECIMAL/NUMBER value is written as a ‘decimal’ Avro logical type, a specific ‘precision’ denoting number of available digits is required. Generally, precision is defined by column data type definition or database engines default. However undefined precision (0) can be returned from some database engines. ‘Default Decimal Precision’ is used when writing those undefined precision numbers.

dbf-default-scale

When a DECIMAL/NUMBER value is written as a ‘decimal’ Avro logical type, a specific ‘scale’ denoting number of available decimal digits is required. Generally, scale is defined by column data type definition or database engines default. However when undefined precision (0) is returned, scale can also be uncertain with some database engines. ‘Default Decimal Scale’ is used when writing those undefined numbers. If a value has more decimals than specified scale, then the value will be rounded-up, e.g. 1.53 becomes 2 with scale 0, and 1.5 with scale 1.

RELATIONSHIPS¶

NAME

DESCRIPTION

joined

The resultant FlowFile with Records joined together from both the original and enrichment FlowFiles will be routed to this relationship

original

Both of the incoming FlowFiles (‘original’ and ‘enrichment’) will be routed to this Relationship. I.e., this is the ‘original’ version of both of these FlowFiles.

timeout

If one of the incoming FlowFiles (i.e., the ‘original’ FlowFile or the ‘enrichment’ FlowFile) arrives to this Processor but the other does not arrive within the configured Timeout period, the FlowFile that did arrive is routed to this relationship.

failure

If both the ‘original’ and ‘enrichment’ FlowFiles arrive at the processor but there was a failure in joining the records, both of those FlowFiles will be routed to this relationship.

WRITES ATTRIBUTES¶

NAME

DESCRIPTION

mime.type

Sets the mime.type attribute to the MIME Type specified by the Record Writer

record.count

The number of records in the FlowFile

SEE ALSO¶