Member since
05-20-2020
33
Posts
1
Kudos Received
0
Solutions
10-20-2022
12:29 AM
Hi @krishna123 Please try changing the port, you won't face the same issue.
... View more
06-04-2020
05:29 AM
@renuu You have to build the final values you want as separate key value pairs like this: UpdateAttribute Next you will use these attributes to create a json object attribute using AttributesToJson: AttributesToJson flowfile-attribute After that, if you inspect the flowfile you will see the json object as JSONAttributes: FlowFile Attribute JSONAttributes From here you can use it as ${JSONAttributes} or if you need it to be called ${attributes} you just use another UpdateAttribute:
... View more
06-04-2020
05:15 AM
@renuu Create your attributes how you need them to be in UpdateAttribute. Next use attributesToJson to combine the attributes you want, and put them together into a single json object. In this processor set to flowfile-attribute if you need to use them as attributes later. If you need to POST the json, use flowfile-content. Once you have set your attributes in UpdateAttribute, test the flow and view the attributes, or the flowfile content. You may notice the strings are escaped. If they are escaped, and you need them to not be escaped, that is when you must use unescapeJson. You can use unescapeJson anywhere you are allowed to use expression language. You could use it in another UpdateAttribute process to make a new attribute that is unescaped. You can use it in replaceText if you want to unescape the content of the flowfile before posting.
... View more
06-01-2020
06:59 AM
big thank you to you @stevenmatison
... View more
05-29-2020
07:01 AM
After you posted this new issue, I created a sample like yours, and I had the same error you have above. Then I added the DistributedMapCacheServer, enabled it, and re-tested my flow. I created a template for DetectDuplicate which you can find here: https://github.com/steven-dfheinz/NiFi-Templates/blob/master/DetectDuplicate_DistributedMapCache_Demo.xml If you install the template, you still have to + ADD the Map Cache Server in the Template's Process Group Controller Services. The NiFI Template system does not include the server (known bug), it only includes the client.
... View more
05-28-2020
06:51 AM
@stevenmatison thank you for your reply ...now i got this error ...i have gone through your reply
... View more
05-22-2020
05:35 AM
@renuu RouteOnAttribute is the method to do this. You will need to use EvaluateJsonPath to get the attributes you want to route on. For Example: checkResource = $.alarms.resource Then code off that attribute in RouteOnAttribute: ${checkResource:equals('abc')} Also be sure to use valid json. In your post above, the snippet is incorrect format with spelling errors. See my other reply for more info on JSON Validation as well as input on EvaluateJSON. If this answer resolves your issue or allows you to move forward, please choose to ACCEPT this solution and close this topic. If you have further dialogue on this topic please comment here or feel free to private message me. If you have new questions related to your Use Case please create separate topic and feel free to tag me in your post. Thanks, Steven @ DFHZ
... View more
05-21-2020
04:55 AM
@myoung ...in nifi i have used invoked http processor that get data from web app.. i want to apply the condition on json data file ...i means when the resource="abc" the alarm get filter and goes to one processor and other alarm will go to another processor.....so my question is what are the processor is required..as of now i have used one http invoked that will provide all the alarm form my web app ..two putfile processor for storing alarm one for resource="abc" and one for other resource. and i have also used one Routonatrribute processor for condition..in RoutOnAttribute config i have decalred on dynamic property whic is ....the name of property is alarms.resource and the value is ${alarms.resource:equals('abc')} the below is respon of Invoked http processor...want the alarm that contain resource='abc' that will go to one put file processor { "alamrs": [ { "correlate": [ " ", " ", " " ], "event": " ", "group": " ", "history": [ { "event": " ", "href": " ", "id": " ", "resource": " abc ", "status": " ", "text": " ", "type": " ", "updateTime": " ", "user": " ", "value": "--" } ], "href": " ", "id": "", "rawData": null, "receiveTime": " ", "service": [ " " ], "resource": "abc", "status": " ", "tags": [ "" ], "text": " : ", "timeout": , }, { "correlate": [ " ", " ", " " ], "event": " ", "group": " ", "history": [ { "event": " ", "href": " ", "id": " ", "resource": " abc ", "status": " ", "text": " ", "type": " ", "updateTime": " ", "user": " ", "value": "--" } ], "href": " ", "id": "", "rawData": null, "receiveTime": " ", "service": [ " " ], "resource": "abc", "status": " ", "tags": [ "" ], "text": " : ", "timeout": , }, { "correlate": [ " ", " ", " " ], "event": " ", "group": " ", "history": [ { "event": " ", "href": " ", "id": " ", "resource": " abc ", "status": " ", "text": " ", "type": " ", "updateTime": " ", "user": " ", "value": "--" } ], "href": " ", "id": "", "rawData": null, "receiveTime": " ", "service": [ " " ], "resource": "abc", "status": " ", "tags": [ "" ], "text": " : ", "timeout": , } @
... View more