FetchElasticsearchHttp

Description:

Retrieves a document from Elasticsearch using the specified connection properties and the identifier of the document to retrieve. Note that the full body of the document will be read into memory before being written to a Flow File for transfer.

Tags:

elasticsearch, fetch, read, get, http

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, whether a property supports the NiFi Expression Language, and whether a property is considered "sensitive", meaning that its value will be encrypted. Before entering a value in a sensitive property, ensure that the nifi.properties file has an entry for the property nifi.sensitive.props.key.

NameDefault ValueAllowable ValuesDescription
Elasticsearch URLElasticsearch URL which will be connected to, including scheme (http, e.g.), host, and port. The default port for the REST API is 9200.
Supports Expression Language: true
SSL Context ServiceController Service API:
SSLContextService
Implementation:StandardSSLContextService
The SSL Context Service used to provide client certificate information for TLS/SSL connections. This service only applies if the Elasticsearch endpoint(s) have been secured with TLS/SSL.
UsernameUsername to access the Elasticsearch cluster
Supports Expression Language: true
PasswordPassword to access the Elasticsearch cluster
Sensitive Property: true
Supports Expression Language: true
Connection Timeout5 secsMax wait time for the connection to the Elasticsearch REST API.
Supports Expression Language: true
Response Timeout15 secsMax wait time for a response from the Elasticsearch REST API.
Supports Expression Language: true
Document IdentifierThe identifier of the document to be fetched
Supports Expression Language: true
IndexThe name of the index to read from.
Supports Expression Language: true
TypeThe (optional) type of this document, used by Elasticsearch for indexing and searching. If the property is empty, the first document matching the identifier across all types will be retrieved.
Supports Expression Language: true
FieldsA comma-separated list of fields to retrieve from the document. If the Fields property is left blank, then the entire document's source will be retrieved.
Supports Expression Language: true

Relationships:

NameDescription
retryA FlowFile is routed to this relationship if the document cannot be fetched but attempting the operation again may succeed. Note that if the processor has no incoming connections, flow files may still be sent to this relationship based on the processor properties and the results of the fetch operation.
successAll FlowFiles that are read from Elasticsearch are routed to this relationship.
failureAll FlowFiles that cannot be read from Elasticsearch are routed to this relationship. Note that only incoming flow files will be routed to failure.
not foundA FlowFile is routed to this relationship if the specified document does not exist in the Elasticsearch cluster. Note that if the processor has no incoming connections, flow files may still be sent to this relationship based on the processor properties and the results of the fetch operation.

Reads Attributes:

None specified.

Writes Attributes:

NameDescription
filenameThe filename attribute is set to the document identifier
es.indexThe Elasticsearch index containing the document
es.typeThe Elasticsearch document type

State management:

This component does not store state.

Restricted:

This component is not restricted.

Input requirement:

This component allows an incoming relationship.