Support Questions

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

Nifi problem with PutElasticsearch5

avatar

Could you please help me to resolve the following problem in nifi PutElasticsearch5 processor

nifi-putelasticsearch-problem.png

1 ACCEPTED SOLUTION

avatar
Master Guru

It's hard to tell from your screenshot what is going on. What kind of file(s) are being read into NiFi, and what is the content of the flow file(s) going to PutElasticsearch5? PutES5 expects a single JSON document as the content of a flow file, and depending on your processor configuration, will perform your specified operation on each document.

If your flow file contains multiple documents, you may need SplitJson to get each into its own flow file. Alternatively if you are using NiFi 1.3.0 / HDF 3.0 (and don't mind using Elasticsearch's HTTP API vs the native one), you can use PutElasticsearchHttpRecord, which will allow you to handle flow files that contain multiple records of any format (provided you configure a Record Reader that can parse your input).

View solution in original post

2 REPLIES 2

avatar
Master Guru

It's hard to tell from your screenshot what is going on. What kind of file(s) are being read into NiFi, and what is the content of the flow file(s) going to PutElasticsearch5? PutES5 expects a single JSON document as the content of a flow file, and depending on your processor configuration, will perform your specified operation on each document.

If your flow file contains multiple documents, you may need SplitJson to get each into its own flow file. Alternatively if you are using NiFi 1.3.0 / HDF 3.0 (and don't mind using Elasticsearch's HTTP API vs the native one), you can use PutElasticsearchHttpRecord, which will allow you to handle flow files that contain multiple records of any format (provided you configure a Record Reader that can parse your input).

avatar

Problem resolved by using SplitJson processor.

Thanks a lot.