nifi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pierre Villard <pierre.villard...@gmail.com>
Subject Re: Not able to create document_id using expression-language in PutCouchbaseKey
Date Tue, 13 Mar 2018 12:39:30 GMT
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 <rsvangari@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/
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message