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.

NameDefault ValueAllowable ValuesDescription
ModeENCODE
  • ENCODE
  • DECODE
Specifies whether to encode latitude/longitude to geohash or decode geohash to latitude/longitude
Record ReaderController Service API:
RecordReaderFactory
Implementations: JsonPathReader
AvroReader
XMLReader
WindowsEventLogReader
ReaderLookup
Syslog5424Reader
GrokReader
ScriptedReader
CSVReader
SyslogReader
ParquetReader
JsonTreeReader
CEFReader
Specifies the record reader service to use for reading incoming data
Record WriterController Service API:
RecordSetWriterFactory
Implementations: AvroRecordSetWriter
ScriptedRecordSetWriter
JsonRecordSetWriter
ParquetRecordSetWriter
RecordSetWriterLookup
FreeFormTextRecordSetWriter
XMLRecordSetWriter
CSVRecordSetWriter
Specifies the record writer service to use for writing data
Routing 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 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 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 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 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 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.