Support Questions

Find answers, ask questions, and share your expertise

Can we add custom attribute in Apache NiFi on the fly in a processor without making a change in code

avatar
Rising Star

If I am adding a property from UI it is giving me an error saying property is not valid

Although using UpdateAttribute processor we update the existing attribute but I am looking for ways to add new property in a processor say 'GetFile' and I want to add a property say 'nickname'

PFA image of same

1 ACCEPTED SOLUTION

avatar
Master Guru

If you are trying to add an attribute to a flow file, you can use UpdateAttribute for that. If you are trying to add a property to a processor, then it depends on the processor whether it supports dynamic (or "User-Defined") properties. If a processor does not support dynamic properties, then when you try to add one, the processor will be deemed invalid.

View solution in original post

5 REPLIES 5

avatar
Rising Star

PFA image of same

avatar
Master Guru

If you are trying to add an attribute to a flow file, you can use UpdateAttribute for that. If you are trying to add a property to a processor, then it depends on the processor whether it supports dynamic (or "User-Defined") properties. If a processor does not support dynamic properties, then when you try to add one, the processor will be deemed invalid.

avatar
Rising Star

@Matt Burgess

Thank your for your response.

Which all processor supports dynamic properties. Any link would be helpful.

Thanks,

avatar
Master Mentor

@Pradhuman Gupta

Processors that support dynamic properties will include that information in their associated documentation.

You can access processor documentation specific the NiFi release you are running via help found in the menu located in the upper right corner of the NiFi UI.

You can also find the latest Apache NiFi version processor documentation here:

https://nifi.apache.org/docs.html

As an example of a processor that supports dynamic properties, look at GenerateFlowFile or UpdateAttribute.

Thanks,

Matt

avatar
Rising Star

@Matt Clarke

Hi Matt,

Thank you I understood it now, I will go through documentation to learn more on this.

Thanks