Re: How to make a lookup service return a Record

2017-11-12 Thread Eric Chaves
Thanks Mike! I've followed your suggestion and also took some code from
Test_record_reader_inline.groovy  (
https://github.com/jjhbeloved/nifi/blob/c70643ab5ea822c8648b77b2216f8e23b9d0ae0b/nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-processors/src/test/resources/groovy/test_record_reader_inline.groovy
).



2017-11-12 21:43 GMT-02:00 Mike Thomsen :

> Take a look at the MongoDBLookupService. It should give you a template to
> work from:
>
> https://github.com/apache/nifi/blob/9a8e6b2eb150865361dda241d71405
> c5a969f5e8/nifi-nar-bundles/nifi-standard-services/nifi-
> mongodb-services-bundle/nifi-mongodb-services/src/main/
> java/org/apache/nifi/mongodb/MongoDBLookupService.java
>
> On Sun, Nov 12, 2017 at 4:45 PM, Eric Chaves  wrote:
>
>> Hi Folks,
>>
>> I've being cracking my head before asking but couldn't figure out how to
>> make an ScriptedLookupService (groovy) return either a Record or an Map. So
>> far I was only able to return single values.
>>
>> Can anyone point me in the right direction?
>>
>> Cheers,
>>
>
>


Re: How to make a lookup service return a Record

2017-11-12 Thread Mike Thomsen
Take a look at the MongoDBLookupService. It should give you a template to
work from:

https://github.com/apache/nifi/blob/9a8e6b2eb150865361dda241d71405c5a969f5e8/nifi-nar-bundles/nifi-standard-services/nifi-mongodb-services-bundle/nifi-mongodb-services/src/main/java/org/apache/nifi/mongodb/MongoDBLookupService.java

On Sun, Nov 12, 2017 at 4:45 PM, Eric Chaves  wrote:

> Hi Folks,
>
> I've being cracking my head before asking but couldn't figure out how to
> make an ScriptedLookupService (groovy) return either a Record or an Map. So
> far I was only able to return single values.
>
> Can anyone point me in the right direction?
>
> Cheers,
>


How to make a lookup service return a Record

2017-11-12 Thread Eric Chaves
Hi Folks,

I've being cracking my head before asking but couldn't figure out how to
make an ScriptedLookupService (groovy) return either a Record or an Map. So
far I was only able to return single values.

Can anyone point me in the right direction?

Cheers,