Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 03-13-2024 06:03 AM
Hi there ,
We are looking for a way to list all keys of redis cache thru nifi. The best solution we found was a groovy script from this article Get list of keys in NiFi DistributedMapCache
The script looks good and exactly what we are looking for. But when we try to implement it, we get the following error:
We are using the invokescriptprocessor and configure like this
What are we missing here 😉 Or another solutions is also more than welcome.
Thank you in advanced.
Kind regards,
Dave
Created 03-19-2024 12:48 PM
@mburgess @SAMSAL Hi! Do you have any insights here? Thanks!
Regards,
Diana Torres,Created 03-19-2024 12:58 PM
The post you linked to has the command-line version of the Groovy script, it's based on my blog post at: https://funnifi.blogspot.com/2016/04/inspecting-your-nifi.html. You can put that code in your ExecuteScript (or InvokeScriptedProcessor in the onTrigger()). It might need slight alterations but should be pretty close. If you want to write them to a FlowFile you'll have to add that to the script as well.
Created 03-20-2024 08:17 AM
Hi there @mburgess thank you for your reply. Let play around with your solution and see if i can get it working and write the output to a flowfile 🤓