Member since
02-15-2019
7
Posts
0
Kudos Received
0
Solutions
05-02-2019
04:45 PM
Thanks Matt, I didn't realize that the colored text was not a comment in this case.
... View more
05-02-2019
02:59 PM
With the '\' character, the '#' character still highlights the text after it as a comment:
... View more
05-02-2019
02:20 PM
I'm trying to use regex to match the line: # DOG CAT BIRD NiFi regex seems to treat # as a comment character, whereas other regexes do not. How do I match the literal character # in a string with regex? The doc page https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#escaping doesn't seem to help me out here.
... View more
04-02-2019
06:52 PM
When I start the NiFi service in Windows Services manager, NiFi shoots up to around 5.9GB of memory used. This is without even passing any data into the NiFi flow, just the flow existing with the processors on. I have a ListenTCP, 4 ReplaceText processors, and a PostHTTP processor. Why is NiFi using so much memory while doing nothing, and how can I optimize NiFi's memory usage to fix this?
... View more
Labels:
02-27-2019
01:54 PM
@Shu In regards to your second option, using a ReplaceText processor: I can successfully use regex to match with existing lines, but I can't seem to extract only the text that I matched with. When using a replacement value of $1, I still end up with the lines that I did not want to save. For example, if my text is: cat dog fish dog bird I can successfully capture the "dog" lines, but when my Replacement Value is set to $1, the result is still: cat dog fish dog bird I'm not sure how I can use ReplaceText to extract only the lines that I match with.
... View more
02-27-2019
12:35 AM
Given a flowfile of text, I'm trying to extract certain lines from it using regex and pass ONLY those lines onto the next processors. For example, if I have the text: cat dog fish dog bird I only want to extract the lines with "dog", then put those lines into their own flowfile that would look like: dog dog I understand that using an ExtractText processor is probably my best bet in this case, but I'm not sure of how this processor is used correctly. I've read multiple questions where the answer describes how to grab specific text and store them into attributes, but the answers always stop there. I need to know how I can then use those attributes and pass them to another processor, and how to make that processor only use those attributes that ExtractText caught. TL;DR: How do I use ExtractText to grab specific lines, then pass those lines to another processor, and then how do I use that processor to spit out the previously grabbed lines?
... View more
02-15-2019
06:04 PM
I'm trying to use the ExecuteScript processor to take in a flow file, convert that flow file to a string, regex the string, convert the regexed string back into a flow file, then pass that flow file along the processor flow. I'm wanting to do this with Python. As an example, an incoming string might have text like "The 8 dogs jumped over the 2 cats !". I want the result to look like "The_8_dogs_jumped_over_the_2_cats_!". I've already got a regex that works in this case, my trouble lies within converting the incoming flow file into a string that I can then use regex on. The nature of the regex requires the string to be processed multiple times to eliminate all of the whitespaces, so I would like the ExecuteScript processor to be able to pass back into itself multiple times per flowfile. Another note: I've tried using a ReplaceText processor coupled with a RouteOnContent processor, however this solution is much too slow to handle the quantity of data I'm working with (even when adjusting the concurrent tasks property). In short I want to convert a flowfile to a string, do some regex substitutions, then convert back to a flowfile.
... View more