Member since
10-13-2016
17
Posts
0
Kudos Received
0
Solutions
10-07-2017
02:20 PM
1 Kudo
@Vinod Chhabria I found another way to implement this using UpdateAttribute processor in NiFi 1.3. UpdateAttribute has the feature of state in this version. I didn't test in NiFi 1.2 so I can't tell if this will work in previous version. Here's the global solution: In the upper stream you have data coming from Cassandra with the new value. I don't have this so I simulated data coming in JSON format from GenerateFlow. This processor trigger each one hour to generate new key. For you it will be get data from Cassandra. What you will be doing for data coming from this stream is basically adding two attributes : type = 'update_key' and key = 'the key that you get from Cassandra'. In my case I did it with two processors UpdateAttribute and EvaluateJSONPath configured as follow: On the bottom stream you get you data to encrypt. So all what you need to do is add an attribute type = 'data' (this is optional). I do it with an UpdateAttribute. ow both these streams will go to an UpdateAttribute processor that will add an attribute encryptionkey and store it in State. We will initialize it with an empty value. As you can see, I'll add the value in the state as this attribute. See the configuration below: Now what I want to do is update this key in state only when I have a flow file from the upper stream (AKA : type = update_key). To do this, click on the Advanced setting in the left-bottom of the update attribute add the following configurations: with this condition we will be updating the encription key only once per hour when new data comes from Cassandra. After the updateattribute, you can route based on the type to drop message coming from Cassandra (update_key) and encrypt the others. Can you try this and let me know if it works?
... View more
11-09-2016
03:53 PM
@Vinod Chhabria We should try to keep one thread going instead of creating a new "answer" each time. NiFi supports the following browsers:
Mozilla Firefox: current & current - 1 Google Chrome: current & current - 1 Microsoft Edge Safari 8 The version of Firefox you are using is pretty old. If you upgrade to the current Firefox version or try using teh current version of Chrome instead, do you still see the same behavior? Thanks, Matt
... View more