Member since
06-17-2019
3
Posts
0
Kudos Received
0
Solutions
09-17-2019
12:52 AM
Hi All, I would like to capture the Nifi processor error message due to failure on some reasons. The popup coming up and getting expired in 5 minutes.My plan is the error messages should be captured (like by some Nifi processors) and send it via email.I cannot capture the error messages on the fly. Any thoughts on this please?. Ex: The screenshot has the error message and and i need to capture the entire messages and send via email.
... View more
Labels:
- Labels:
-
Apache NiFi
06-18-2019
01:08 AM
Please let me know if the question is not clear. I will re-write the question again.
... View more
06-17-2019
11:37 PM
HI All, I am trying to iterate the nifi flow file and modify each line in the flow file using python script in 'ExecuteScript'.But it is not working as expected. For example i would like to append 'Rajiv' string at the end for each line in the flow file.but it is adding only at the end of the end of the flow file. Code Execute script content: import json import java.io from org.apache.commons.io import IOUtils from java.nio.charset import StandardCharsets from org.apache.nifi.processor.io import StreamCallback class PyStreamCallback(StreamCallback): def __init__(self, flowfile): self.ff = flowfile pass def process(self, inputStream, outputStream): text = IOUtils.toString(inputStream, StandardCharsets.UTF_8) text = text + 'rajiv' outputStream.write(bytearray(text.encode('utf-8'))) flowFile = session.get() if (flowFile != None): flowFile = session.write(flowFile,PyStreamCallback(flowFile)) session.transfer(flowFile, REL_SUCCESS) Generate flow file input: 1234 5678 output: 1234 5678rajiv Expected output: 1234rajiv 5678rajiv
... View more
Labels:
- Labels:
-
Apache NiFi