You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "David Pfingst (Jira)" <ji...@apache.org> on 2025/03/12 13:20:00 UTC

[jira] [Created] (NIFI-14361) Python Processor getDynamicPropertyDescriptor not working

David Pfingst created NIFI-14361:
------------------------------------

             Summary: Python Processor getDynamicPropertyDescriptor not working
                 Key: NIFI-14361
                 URL: https://issues.apache.org/jira/browse/NIFI-14361
             Project: Apache NiFi
          Issue Type: Bug
          Components: Extensions
    Affects Versions: 2.2.0
            Reporter: David Pfingst


When using "getDynamicPropertyDescriptor" to create dynamic properties, an unexpected behaviour was observed while progamming custom python processors in NiFi 2.2.0.

If i define the processor with "FlowFileTransform", i can add properties, but sometimes a validation error is thrown. When dynamic properties have been defined and the container is restarted, a validation error is always thrown because the properties cannot be mapped.

If i define the processor with "RecordTransform", a validation error is thrown immediately as soon as a property is added because, again, the property cannot be mapped. When the container is restarted in this case, all properties can be mapped.

Both processor have exactly the same code.

 

I have defined the properties as follows:
{code:java}
def getDynamicPropertyDescriptor(self, name):        return PropertyDescriptor(            
         name=name,
         description="Specifies the value to set for the '"+ name +"' field",          expression_language_scope=ExpressionLanguageScope.FLOWFILE_ATTRIBUTE,          dynamic=True,            
         validators = [StandardValidators.ALWAYS_VALID]        
         ) {code}
The actual error i get is:
<DYNAMIC_PROPERTY_NAME>  against '< DYNAMIC_PROPERTY_VALUE>' is invalid because "<DYNAMIC_PROPERTY_NAME> is not supported property or has no Validator associated with it
{{}}

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)