Support Questions

Find answers, ask questions, and share your expertise

how to send attribute from nifi

Explorer

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 

2 REPLIES 2

@renuu  Can you update the post above with screenshot of your UpdateAttribute and InvokeHttp settings?  Also let us see the content of the flowfile you are sending to UpdateAttribute.

 

 

It sounds like you have the right method, but maybe need some adjustment in those settings.  I will be able to comment better once I can see your screenshots.

Explorer

updateAttribute

renuu_0-1591187413227.png

Attributetojson

renuu_1-1591187455654.png

invoke http

renuu_2-1591187552306.png

 

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.