0

I need to update Redis database with flowfiles running on Nifi.

I already wrote custom python script to update redis db and it can be run on ExecuteStreamCommand.

Alternatively, I'm looking for doing the same thing with ExecuteScript and Jython because it is easy to manage the Nifi pipeline.

But according to the following link, it seems Jython can use only pure-python module. Since Redis is written in C language, my guess is I can not simply write script in the ExecuteScript processor.

Import Modules in Nifi ExecuteScript

So how can I update redis database using Jython in ExecuteScript??

Also, in terms of speed, which way (ExecuteStreamCommand vs ExecuteScript) can give better performance??

Because as far as I tried, running python script on ExecuteStreamCommand was faster.

Micro_Andy
  • 93
  • 1
  • 9
  • nifi written in java, so theoretically ExecuteScript will work bit faster. in jython you could use java-redis-client or distriburedcache* nifi-services to work with redis. – daggett Jul 03 '19 at 09:58
  • What I need is to keep adding value as set data on Redis. If same key comes in, it will be appended as set. For this use case, should I use Jython and Jedis maybe?? – Micro_Andy Jul 04 '19 at 01:31

0 Answers0