Dear users,

I would like to use ScriptedLookupService with Python, but I am not
succeeding in get any scripts working .

On the basis of an example that I found for groovy, I am trying something
like this:

import org.apache.nifi.lookup.LookupService as LookupService
from org.apache.nifi.processor import PropertyDescriptor

class SequenceLookupService(LookupService):
propertyDescriptor = PropertyDescriptor.Builder().name("Database Connection
Pooling Service").description("The Controller Service that is used to
obtain connection to
database").required(True).identifiesControllerService(LookupService).build()

def OnEnabled():
    pass

  def OnDisabled():
    pass

def initialize():
    pass

def lookup(coordinates):
    return "test"

def getPropertyDescriptor(name):
            return propertyDescriptor

        def getPropertyDescriptors():
    return [propertyDescriptor]


lookupService = SequenceLookupService()

Could any of you point me to some examples of how to use python for the
ScriptedLookupService ?
Thanks in advance for any support.

Reply via email to