Support Questions
Find answers, ask questions, and share your expertise
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Stuck on "PutElasticSearchHttpRecord" - "Record Reader" and schemas

Stuck on "PutElasticSearchHttpRecord" - "Record Reader" and schemas

New Contributor


Hello, I'm brand new to NiFi and am exploring it for a few things (cloudtrail logs in S3 -> Elasticsearch, SFTP to external parties, S3 data synch etc). While it was insanely easy to set it up initially, I am now horribly stuck...

I can pull a file with a bunch of AWS Cloudtrail logs in JSON format (a sample shown below) off an S3 bucket, I can for fun write it to a local file, split the CloudTrail file into individual JSON records, parse out the "eventID" and rename the filename so that I can write the JSON records into separate files with the eventID as the name. I can SFTP the file no problem. Don't ask me for the reasons for my data flows, at the moment I'm trying to find out what it can do for us ...

But then I hit the wall...

No matter what I do, I cannot get a piece of JSON through "PutElasticsearchHttpProcessor" and I'm getting stuck on the "Record Reader". I have tried JsonPathReader vith different "Schema Access Strategy" settings (noth "Schema Name" and "Schema Text"), setting "" manually etc., but I don't really understand why I have to specify a schema to be able to push an already well formed JSON record through . Does anyone have any idea where I might be going wrong?



Re: Stuck on "PutElasticSearchHttpRecord" - "Record Reader" and schemas

New Contributor

You need to create a controller service which is JsonTreeReader first, then configure it on the PutElasticSearchHttpRecord processor as below.



Don't have an account?
Coming from Hortonworks? Activate your account here