NIFI-13256 Corrected Example WriteHelloWorld Processor Attributes

Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com>

This closes #8841.
This commit is contained in:
exceptionfactory 2024-05-16 10:25:21 -05:00 committed by Pierre Villard
parent 439851fa6e
commit 15ac906725
No known key found for this signature in database
GPG Key ID: F92A93B30C07C6D5
1 changed files with 2 additions and 2 deletions

View File

@ -153,10 +153,10 @@ class WriteHelloWorld(FlowFileTransform):
version = '0.0.1-SNAPSHOT'
def __init__(self, **kwargs):
super().__init__(**kwargs)
pass
def transform(self, context, flowfile):
return FlowFileTransformResult(relationship = "success", contents = "Hello World", attributes = {"greeting", "hello"})
return FlowFileTransformResult(relationship = "success", contents = "Hello World", attributes = {"greeting": "hello"})
----
The `transform` method is expected to take two arguments: the context (of type `nifiapi.properties.ProcessContext`) and