Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

How to insert data in elastic search using Apache Nifi?

avatar
Contributor

7505-screenshot-from-2016-09-09-15-55-05.png

Getting the above exception .How to solve this?

Unable to put data in elastic search.

and In configuration in Identifier Attribute what must be given?

Cluster NameInfo

elasticsearch
ElasticSearch HostsInfo
D-9033.xyz.com:9200
SSL Context ServiceInfo No value set Shield Plugin FilenameInfo No value set UsernameInfo No value set PasswordInfo No value set ElasticSearch Ping TimeoutInfo
5s
Sampler IntervalInfo
5s

Identifier Attribute

Info
twt
IndexInfo
tweet_google_1461888000_1477440000
TypeInfo
twt
Character SetInfo
UTF-8
Batch SizeInfo
10
Index OperationInfo
index
1 REPLY 1

avatar
Master Guru

The PutElasticsearch processor uses the Transport API for Elasticsearch, not the HTTP API. This means your port should be 9300 not 9200.

The "Identifier Attribute" property is the name of a flow file attribute that contains a unique identifer for the document. If you don't have an identifier you want to use, you can put "uuid", this will use the flow file's UUID as the identifier for the Elasticsearch document. If you do have an identifier for the document, put its value (using UpdateAttribute, EvaluateJsonPath, etc.) into a flow file attribute, and put that attribute's name in the "Identifier Attribute" property. Note you don't use Expression language here, so if your attribute's name is "doc_id", you put "doc_id" in the Identifier Attribute property, not "${doc_id}"