nifi-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From happy smith <>
Subject ScriptedLookupService with Python
Date Wed, 30 Jan 2019 18:28:45 GMT
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

def OnEnabled():

  def OnDisabled():

def initialize():

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.

View raw message