Return-Path: X-Original-To: apmail-nifi-commits-archive@minotaur.apache.org Delivered-To: apmail-nifi-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 86823184FF for ; Thu, 5 Nov 2015 14:58:28 +0000 (UTC) Received: (qmail 61233 invoked by uid 500); 5 Nov 2015 14:58:28 -0000 Delivered-To: apmail-nifi-commits-archive@nifi.apache.org Received: (qmail 61125 invoked by uid 500); 5 Nov 2015 14:58:28 -0000 Mailing-List: contact commits-help@nifi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@nifi.apache.org Delivered-To: mailing list commits@nifi.apache.org Received: (qmail 60897 invoked by uid 99); 5 Nov 2015 14:58:28 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Nov 2015 14:58:28 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 122BF2C1F6B for ; Thu, 5 Nov 2015 14:58:28 +0000 (UTC) Date: Thu, 5 Nov 2015 14:58:28 +0000 (UTC) From: "Mark Payne (JIRA)" To: commits@nifi.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (NIFI-942) Create RouteText processor MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/NIFI-942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14991766#comment-14991766 ] Mark Payne commented on NIFI-942: --------------------------------- Removed Fix Version and canceled patch for this ticket because only 1 of the two subtasks is completed and the other will not likely happen in 0.4.0. > Create RouteText processor > -------------------------- > > Key: NIFI-942 > URL: https://issues.apache.org/jira/browse/NIFI-942 > Project: Apache NiFi > Issue Type: New Feature > Components: Extensions > Reporter: Mark Payne > Assignee: Joseph Percivall > Attachments: 0002-NIFI-942-Added-Ignore-Case-property-added-unit-tests.patch > > > The idea is to route individual lines of a text file to different relationships. This allows for splitting lines based on some criteria or filtering out specific lines, and would be a much more convenient alternative than RouteOnContent for textual data. > A discussion for this took place on the users mailing list (http://mail-archives.apache.org/mod_mbox/nifi-users/201509.mbox/%3CCAKpk5PxjszdX-NXMMf6Pcet4x7Y5GmrT7_jn9uyzS-h_a9TG3A%40mail.gmail.com%3E) > The way that I could see this working is to have a few different properties: > Routing Strategy: > - Route each line to matching Property Name (default) > - Route matching lines to 'matched' if all match > - Route matching lines to 'matched' if any match > - Route FlowFile to 'matched' if all lines match > - Route FlowFile to 'matched' if any line matches > A Match Strategy > - Starts With > - Ends With > - Contains > - Equals > - Matches Regular Expression > - Contains Regular Expression > And then user-defined properties that indicate what to search each line of text for. > So to find lines that begin with the < character > You would simply add a property named "Begins with Less Than" and set the value to : < > Then set the Match Strategy to Starts With > And Routing Strategy to "Route each line to matching Property Name" > Then, any line that begins with < will be routed to the Begins with Less Than relationship. > This would be a simple way to pull out any particular lines of interest in a text file. > I can see this being very useful for processing log files, CSV, etc. -- This message was sent by Atlassian JIRA (v6.3.4#6332)