PutElasticsearchJson 2.3.0¶
BUNDLE¶
org.apache.nifi | nifi-elasticsearch-restapi-nar
DESCRIPTION¶
An Elasticsearch put processor that uses the official Elastic REST client libraries. Each FlowFile is treated as a document to be sent to the Elasticsearch _bulk API. Multiple FlowFiles can be batched together into each Request sent to Elasticsearch.
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-json-charset |
Specifies the character set of the document data. |
put-es-json-dynamic_templates |
The dynamic_templates for the document. Must be parsable as a JSON Object. Requires Elasticsearch 7+ |
put-es-json-id-attr |
The name of the FlowFile attribute containing the identifier for the document. If the Index Operation is “index”, this property may be left empty or evaluate to an empty value, in which case the document’s identifier will be auto-generated by Elasticsearch. For all other Index Operations, the attribute must evaluate to a non-empty value. |
put-es-json-script |
The script for the document update/upsert. Only applies to Update/Upsert operations. Must be parsable as JSON Object. If left blank, the FlowFile content will be used for document update/upsert |
put-es-json-scripted-upsert |
Whether to add the scripted_upsert flag to the Upsert Operation. If true, 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-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-batch-size |
The preferred number of FlowFiles to send over in a single batch |
put-es-record-index-op |
The type of the operation used to index (create, delete, index, update, upsert) |
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. |
RELATIONSHIPS¶
NAME |
DESCRIPTION |
---|---|
original |
All flowfiles that are sent to Elasticsearch without request failures go to this relationship. |
successful |
Record(s)/Flowfile(s) corresponding to Elasticsearch document(s) that did not result in an “error” (within Elasticsearch) will be routed here. |
errors |
Record(s)/Flowfile(s) corresponding to Elasticsearch document(s) that resulted 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, sending the parsed document to Elasticsearch or parsing the Elasticsearch response |
elasticsearch.bulk.error |
The _bulk response if there was an error during processing the document within Elasticsearch. |