finally I understood how it works! ;)
I ended up adding 'authority' using JoltTransformation to use /authority
and now everything works fine
thanks Mike & Pierre for your input.
On 25 May 2018 at 15:37, Mike Thomsen wrote:
> Based on your schema, when authority or code are not available in
Based on your schema, when authority or code are not available in the
flowfile content the record is invalid.
On Fri, May 25, 2018 at 8:30 AM Thomas P.
wrote:
> in the json example from my first post the field "authority" is set and in
> this case I could use
Expression Language can be used to dynamically set the path to look for,
using the flow file attributes. As Mike said, if you have
authority=MyAuthority in your flow file attributes, then LookupRecord
configured with /${authority} will behave exactly as if you configured the
processor with
in the json example from my first post the field "authority" is set and in
this case I could use /authority
but when this field is not available in the content?
{
"code": "A1234",
"descriptions": [
{
"language": "EN",
"description": "Nifi rocks!"
}
]
}
On 25 May 2018
/${authority} will yield a record path of /MyAuthority, but there is no
"MyAuthority" in your flowfile.
/authority, however, will do a lookup on the record and should find the
value MyAuthority and set a map of { authority => MyAuthority } for the
lookup service.
On Fri, May 25, 2018 at 8:02 AM
authority is an existing attribute on the flowfile. In the content itself
this field is not available thats why I want to use the attributes value
for querying.
On 25 May 2018 at 13:40, Pierre Villard wrote:
> Hi,
>
> Is 'authority' an existing attribute in the
Hi,
Is 'authority' an existing attribute in the incoming flow files or is it
only an information available in the content of the flow file ?
Pierre
2018-05-25 13:07 GMT+02:00 Thomas P. :
> Hello community,
>
> I am trying to query a MongoDB using LookupRecord
Hello community,
I am trying to query a MongoDB using LookupRecord which works fine when I
read the values directly from the json flow file.
But when I try to query the MongoService using an attribute, I don't find
the expected document.
Here is my nifi 1.6 setup:
json flow file:
{
"code":