PutElasticsearchRecord 2.3.0¶
BUNDLE¶
org.apache.nifi | nifi-elasticsearch-restapi-nar
DESCRIPTION¶
A record-aware Elasticsearch put processor that uses the official Elastic REST client libraries. Each Record within the FlowFile is converted into a document to be sent to the Elasticsearch _bulk APi. Multiple documents can be batched into each Request sent to Elasticsearch. Each document’s Bulk operation can be configured using Record Path expressions.
INPUT REQUIREMENT¶
REQUIRED
Supports Sensitive Dynamic Properties¶
false
PROPERTIES¶
Property |
Description |
---|---|
Max JSON Field String Length |
The maximum allowed length of a string value when parsing a JSON document or attribute. |
el-rest-client-service |
An Elasticsearch client service to use for running queries. |
el-rest-fetch-index |
The name of the index to use. |
el-rest-type |
The type of this document (used by Elasticsearch for indexing and searching). |
put-es-not_found-is-error |
If true, “not_found” Elasticsearch Document associated Records will be routed to the “successful” relationship, otherwise to the “errors” relationship. If Output Error Responses is “true” then “not_found” responses from Elasticsearch will be sent to the error_responses relationship. |
put-es-output-error-responses |
If this is enabled, response messages from Elasticsearch marked as “error” will be output to the “error_responses” relationship.This does not impact the output of flowfiles to the “successful” or “errors” relationships |
put-es-record-at-timestamp |
The value to use as the @timestamp field (required for Elasticsearch Data Streams) |
put-es-record-at-timestamp-date-format |
Specifies the format to use when writing Date fields. If not specified, the default format ‘yyyy-MM-dd’ is used. If specified, the value must match the Java Simple Date Format (for example, MM/dd/yyyy for a two-digit month, followed by a two-digit day, followed by a four-digit year, all separated by ‘/’ characters, as in 01/25/2017). |
put-es-record-at-timestamp-path |
A RecordPath pointing to a field in the record(s) that contains the @timestamp for the document. If left blank the @timestamp will be determined using the main @timestamp property |
put-es-record-at-timestamp-time-format |
Specifies the format to use when writing Time fields. If not specified, the default format ‘HH:mm:ss’ is used. If specified, the value must match the Java Simple Date Format (for example, HH:mm:ss for a two-digit hour in 24-hour format, followed by a two-digit minute, followed by a two-digit second, all separated by ‘:’ characters, as in 18:04:15). |
put-es-record-at-timestamp-timestamp-format |
Specifies the format to use when writing Timestamp fields. If not specified, the default format ‘yyyy-MM-dd HH:mm:ss’ is used. If specified, the value must match the Java Simple Date Format (for example, MM/dd/yyyy HH:mm:ss for a two-digit month, followed by a two-digit day, followed by a four-digit year, all separated by ‘/’ characters; and then followed by a two-digit hour in 24-hour format, followed by a two-digit minute, followed by a two-digit second, all separated by ‘:’ characters, as in 01/25/2017 18:04:15). |
put-es-record-batch-size |
The number of records to send over in a single batch. |
put-es-record-bulk-error-groups |
The errored records written to the “errors” relationship will be grouped by error type and the error related to the first record within the FlowFile added to the FlowFile as “elasticsearch.bulk.error”. If “Treat “Not Found” as Success” is “false” then records associated with “not_found” Elasticsearch document responses will also be send to the “errors” relationship. |
put-es-record-dynamic-templates-path |
A RecordPath pointing to a field in the record(s) that contains the dynamic_templates for the document. Field must be Map-type compatible (e.g. a Map or Record) or a String parsable into a JSON Object. Requires Elasticsearch 7+ |
put-es-record-error-writer |
The response from Elasticsearch will be examined for failed records and the failed records will be written to a record set with this record writer service and sent to the “errors” relationship. Successful records will be written to a record set with this record writer service and sent to the “successful” relationship. |
put-es-record-id-path |
A record path expression to retrieve the ID field for use with Elasticsearch. If left blank the ID will be automatically generated by Elasticsearch. |
put-es-record-index-op |
The type of the operation used to index (create, delete, index, update, upsert) |
put-es-record-index-op-path |
A record path expression to retrieve the Index Operation field for use with Elasticsearch. If left blank the Index Operation will be determined using the main Index Operation property. |
put-es-record-index-record-path |
A record path expression to retrieve the index field for use with Elasticsearch. If left blank the index will be determined using the main index property. |
put-es-record-log-error-responses |
If this is enabled, errors will be logged to the NiFi logs at the error log level. Otherwise, they will only be logged if debug logging is enabled on NiFi as a whole. The purpose of this option is to give the user the ability to debug failed operations without having to turn on debug logging. |
put-es-record-reader |
The record reader to use for reading incoming records from flowfiles. |
put-es-record-retain-at-timestamp-field |
Whether to retain the existing field used as the @timestamp Record Path. |
put-es-record-retain-id-field |
Whether to retain the existing field used as the ID Record Path. |
put-es-record-script-path |
A RecordPath pointing to a field in the record(s) that contains the script for the document update/upsert. Only applies to Update/Upsert operations. Field must be Map-type compatible (e.g. a Map or a Record) or a String parsable into a JSON Object |
put-es-record-scripted-upsert-path |
A RecordPath pointing to a field in the record(s) that contains the scripted_upsert boolean flag. Whether to add the scripted_upsert flag to the Upsert Operation. Forces Elasticsearch to execute the Script whether or not the document exists, defaults to false. If the Upsert Document provided (from FlowFile content) will be empty, but sure to set the Client Service controller service’s Suppress Null/Empty Values to Never Suppress or no “upsert” doc will be, included in the request to Elasticsearch and the operation will not create a new document for the script to execute against, resulting in a “not_found” error |
put-es-record-type-record-path |
A record path expression to retrieve the type field for use with Elasticsearch. If left blank the type will be determined using the main type property. |
RELATIONSHIPS¶
NAME |
DESCRIPTION |
---|---|
original |
All flowfiles that are sent to Elasticsearch without request failures go to this relationship. |
errors |
Record(s)/Flowfile(s) corresponding to Elasticsearch document(s) that resulted in an “error” (within Elasticsearch) will be routed here. |
successful |
Record(s)/Flowfile(s) corresponding to Elasticsearch document(s) that did not result in an “error” (within Elasticsearch) will be routed here. |
retry |
All flowfiles that fail due to server/cluster availability go to this relationship. |
failure |
All flowfiles that fail for reasons unrelated to server availability go to this relationship. |
WRITES ATTRIBUTES¶
NAME |
DESCRIPTION |
---|---|
elasticsearch.put.error |
The error message if there is an issue parsing the FlowFile records, sending the parsed documents to Elasticsearch or parsing the Elasticsearch response. |
elasticsearch.put.error.count |
The number of records that generated errors in the Elasticsearch _bulk API. |
elasticsearch.put.success.count |
The number of records that were successfully processed by the Elasticsearch _bulk API. |
elasticsearch.bulk.error |
The _bulk response if there was an error during processing the record within Elasticsearch. |