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
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
06-01-2020
06:12 AM
hi @stevenmatison thanks for reply ....actually we want to send this timestamp in http processor to get all the alarm which came from this timestamp...can you please suggest how to pass this timestamp in http invoked processor end point.... here i have attached the snap ...i have first used generate flowfile processor after that in upadteAttribute processor i have calculate timestamp which you provide lastTime= ${now():minus(600000):format("yyyy-MM-dd'T'HH:mm:ss'Z'", "GMT")} and thanks this is working ...but now i want to pass this timestamp in http processor for get request ...i have used attributtojson that convert updateAttribut processor output i have used this bec when i connected updateAttribute to evaluatejsonpath processor this processor will give error ....that why i have to used this AtrributeTOjson then i have use evaluatejsonpath to extract timestamp as an attribute bec i have to send the http get request https://localhost:8080/api/alarm?sort-by=from-date=${lastTime} using this timestamp ...but i didn't get appropriate output ..i'll getting all alram
... View more
06-01-2020
03:32 AM
@stevenmatison hi to everyone ...i want to pass the attribute in http invoked processor but the attribute which contain the date and time like 2020-06-01T09:47:59.946Z format....i want to subtract the present time with 10 min.------- this expression i have seen in this community ${now():toNumber():minus(???):format('???')} what i have to put in the place of question mark for 10 min minus ...60000?? and for format 2020-06-01T09:47:59.946Z(+%FT%T.%3NZ if i use this i'll get error in format ) ..... and what processor i have to use...currently i m using updateAttribute for date format thanks in advance
... View more
Labels:
- Labels:
-
Apache NiFi