Member since
05-20-2020
33
Posts
1
Kudos Received
0
Solutions
06-04-2020
04:19 AM
hi everyone , We want to put data in web app using API endpoint https://localhost:8000/api/event/${id}/attributes this is the API endpoint that i have used in invoke HTTP processor in Remote URL field with PUT method. we want to create new attribute with value and this attribute is a dictionary type so we have to pass the data in the dictionary format for this we have used updateattribute processor and attributetojson processor. updateAttribute processor snap Attributetojson processor snap and the below is out of attributetoJson processor (flowfile) {"note":"note from nifi","attributes":"{\n \"workflow\":\"process\"\n }","id":"1ecfbcbb-38bf-49e9-a77e-a88w"} the error msg in invoke http processor { "code": 500, "errors": [ "Traceback (most recent call last):\n File \"/usr/local/lib/python3.6/site-packages/flask/app.py\", line 1949, in full_dispatch_request\n rv = self.dispatch_request()\n File \"/usr/local/lib/python3.6/site-packages/ No value set as per my knowledge this is type error. I think the Dictionary is not sending in correct format . i have also used ${attributes:unescapeJson()} in updateAttribute ...but i think i have made a mistake in the declaration property_name property_value attributes {"workflow": "process"} 'attributes' ${attributes:unescapeJson()} thanks
... View more
Labels:
- Labels:
-
Apache NiFi
06-04-2020
02:58 AM
hi @stevenmatison , this tag is not working ...and we also want to send dictionary {"flow":"process"} in same processor ... is it possible???
... View more
06-04-2020
02:33 AM
awesome thanks @hegdemahendra
... View more
06-03-2020
11:51 PM
@hegdemahendra thanks for solution...but I really want to know listenhttp processor configuration....and your explanation method is awesome with flow and configuration. Thank alot ....
... View more
06-03-2020
05:02 AM
confused related to filed ...my web app made in python ..when i have to update new attribute from python i will just write alarm.attribut[attribute_name]=[attribute_value]...same thing i want to update from nifi ...for this i used invoke http processor and attribute end point in Remote url with PUT method "https://localhost:8080/api/alarm/<alarm_id>/attributes" and i have used two processors updateAttribute and AttributeTojson i think i have done mistake in dynamic property of updateAttribute processor - propertyname -attributes propertyvalue - $.{alarm.attributes['attribute_name'] = 'attribute_value'} or ${alarm.attributes['attribute_name'] = 'attribute_value'} and in AttributeTojson in Attribute List - id,attributes please suggest me the right way of passing new attribute. @stevenmatison thanks
... View more
Labels:
- Labels:
-
Apache NiFi
06-03-2020
02:34 AM
We want to configure listenhttp processor that listen our web service. question is what are the configuration in http listener processor in nifi such that when we will make curl post request this ListenHttp processor will catch the update. basically i didn't understand what i have to put in Base path (is it i have to put nifi address i.e http://localhost:8080/contentListener or our web app service URL???) what is contentListener. And is it i have to put our web app port number in listening port? in the request command what i have to put in url part curl --request POST 'http://(here i have to used the nifi url)' -H 'Authorization: Key demo-key i know this is very basic question but i'm just using this don't know any thing about nifi and curl command .....thanks in advance
... View more
Labels:
- Labels:
-
Apache NiFi
06-01-2020
06:59 AM
big thank you to you @stevenmatison
... View more
06-01-2020
06:43 AM
yes i got it ...i found it ....the problem in the date time format..could you please see on my further reply
... View more
06-01-2020
06:39 AM
@stevenmatison the solution which you provide that give "lastTime":"2020-06-01T12:39:13Z" but i want the format like this 2020-06-01T13:17:13.474Z please see on yellow shed
... View more