Mark Payne created NIFI-12675:
---------------------------------

             Summary: Python Processor erroring when creating custom 
relationships
                 Key: NIFI-12675
                 URL: https://issues.apache.org/jira/browse/NIFI-12675
             Project: Apache NiFi
          Issue Type: Bug
          Components: Core Framework
            Reporter: Mark Payne
            Assignee: Mark Payne


>From apache Slack thread 
>([https://apachenifi.slack.com/archives/C0L9VCD47/p1706176890922519):]
{quote}Hello, I am trying to test some custom python processors with nifi 
2.0.0-M1
It works fine except when I try to add custom relationships to it (other than 
the default success, failure and original).
Here's what I am trying:
{code:java}
        self.matched = Relationship("matched", "flowfiles having a match with 
the regex")
        self.unmatched = Relationship("unmatched", "flowfiles not having any 
match with regex")
        self.failure = Relationship("failure", "flowfiles for which process 
errored while matching")

        self.relationships = {self.matched, self.unmatched, self.failure}
{code}
I get py4j complaining about AttributeError: 'set' object has no attribute 
'_get_object_id'
which seems like the auto conversion of Python to java container is not 
happening for "Relationship" class. Any idea what could be wrong here?
{quote}

The problem appears to be that Relationships created are of type 
{{nifiapi.Relationship}} but that is being sent back to the Java side without 
being converted into a {{org.apache.nifi.processor.Relationship}}



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

Reply via email to