GeohashRecord

Description:

A record-based processor that encodes and decodes Geohashes from and to latitude/longitude coordinates.

Additional Details...

Tags:

geo, geohash, record

Properties:

In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. The table also indicates any default values, and whether a property supports the NiFi Expression Language.

Display NameAPI NameDefault ValueAllowable ValuesDescription
ModemodeENCODE
  • ENCODE
  • DECODE
Specifies whether to encode latitude/longitude to geohash or decode geohash to latitude/longitude
Record Readerrecord-readerController Service API:
RecordReaderFactory
Implementations: CEFReader
SyslogReader
ReaderLookup
ProtobufReader
Syslog5424Reader
CSVReader
GrokReader
WindowsEventLogReader
ScriptedReader
AvroReader
ParquetReader
JsonPathReader
ExcelReader
JsonTreeReader
YamlTreeReader
XMLReader
Specifies the record reader service to use for reading incoming data
Record Writerrecord-writerController Service API:
RecordSetWriterFactory
Implementations: JsonRecordSetWriter
RecordSetWriterLookup
AvroRecordSetWriter
XMLRecordSetWriter
FreeFormTextRecordSetWriter
CSVRecordSetWriter
ParquetRecordSetWriter
ScriptedRecordSetWriter
Specifies the record writer service to use for writing data
Routing Strategyrouting-strategySKIP
  • SKIP
  • SPLIT
  • REQUIRE
Specifies how to route flowfiles after encoding or decoding being performed. SKIP will enrich those records that can be enriched and skip the rest. The SKIP strategy will route a flowfile to failure only if unable to parse the data. Otherwise, it will route the enriched flowfile to success, and the original input to original. SPLIT will separate the records that have been enriched from those that have not and send them to matched, while unenriched records will be sent to unmatched; the original input flowfile will be sent to original. The SPLIT strategy will route a flowfile to failure only if unable to parse the data. REQUIRE will route a flowfile to success only if all of its records are enriched, and the original input will be sent to original. The REQUIRE strategy will route the original input flowfile to failure if any of its records cannot be enriched or unable to be parsed
Latitude Record Pathlatitude-record-pathIn the ENCODE mode, this property specifies the record path to retrieve the latitude values. Latitude values should be in the range of [-90, 90]; invalid values will be logged at warn level. In the DECODE mode, this property specifies the record path to put the latitude value
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
Longitude Record Pathlongitude-record-pathIn the ENCODE mode, this property specifies the record path to retrieve the longitude values; Longitude values should be in the range of [-180, 180]; invalid values will be logged at warn level. In the DECODE mode, this property specifies the record path to put the longitude value
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
Geohash Record Pathgeohash-record-pathIn the ENCODE mode, this property specifies the record path to put the geohash value; in the DECODE mode, this property specifies the record path to retrieve the geohash value
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
Geohash Formatgeohash-formatBASE32
  • BASE32
  • BINARY
  • LONG
In the ENCODE mode, this property specifies the desired format for encoding geohash; in the DECODE mode, this property specifies the format of geohash provided
Geohash Levelgeohash-levelThe integer precision level(1-12) desired for encoding geohash
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)

This Property is only considered if the [Mode] Property has a value of "ENCODE".

Relationships:

NameDescription
successFlowfiles that are successfully encoded or decoded will be routed to success
failureFlowfiles that cannot be encoded or decoded will be routed to failure
originalThe original input flowfile will be sent to this relationship

Reads Attributes:

None specified.

Writes Attributes:

NameDescription
mime.typeThe MIME type indicated by the record writer
record.countThe number of records in the resulting flow file

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:

None specified.