Hi Rohit,

You're using the following expression: ${myJson:jsonPath('$.stud_id')}
So it assumes that in your incoming flow files you have an attribute called
'myJson' that contains your JSON document from which you will extract the
value of the key stud_id.
If the JSON is in the content of your flow file (not as an attribute), then
you first need to use an EvaluateJsonPath to extract the value of the key
stud_id as an attribute of your flow file, and you will be able to use this
attribute for your document ID property in the Couchbase processor. Does it
maje sense?

Thanks,
Pierre


2018-03-13 11:31 GMT+01:00 Rohit <rsvang...@gmail.com>:

> Hi,
>
> I am trying to create couchbase document_id (PutCouchbaseKey processor) as
> json key "stud_id" using expression-language but i am getting below error.
>
> due to uncaught
> Exception:org.apache.nifi.attribute.expressac_noguage.exception.
> AttributeExpressionLanguageException:Subject
> is empty.
>
> Keys:-
> {stud_id,first_name,last_name}
>
> My Teamplate:-
>
> ExecuteHQL->SplitAvro->AvroToJson->PutCouch
>
>
> nifi1.PNG
> <http://apache-nifi-developer-list.39713.n7.nabble.com/file/t927/nifi1.PNG
> >
>
>
>
> --
> Sent from: http://apache-nifi-developer-list.39713.n7.nabble.com/
>

Reply via email to