<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: NIFI - Extract data from  flowfile to write a Query in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/NIFI-Extract-data-from-flowfile-to-write-a-Query/m-p/288112#M213460</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/70892"&gt;@Alexandros&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can accomplish this use ReplaceText with a more complex Java regular expression.&lt;BR /&gt;&lt;BR /&gt;The Replace Text is designed to replace every occurrence of the string matched by your java regular expression with the replacement value.&amp;nbsp; So you are probably seeing your replacement value inserted into your existing content twice.&lt;BR /&gt;&lt;BR /&gt;Try using the following java regular expression which will match your entire 3 lines of content:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;.*\n.*?(\d{2}.\d{4}).*?\n.*?(\d{2}.\d{4}).*&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Leave your replacement value as you already have it and make sure you have Evaluation mode still set to Entire text.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;</description>
    <pubDate>Wed, 22 Jan 2020 21:59:13 GMT</pubDate>
    <dc:creator>MattWho</dc:creator>
    <dc:date>2020-01-22T21:59:13Z</dc:date>
    <item>
      <title>NIFI - Extract data from  flowfile to write a Query</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NIFI-Extract-data-from-flowfile-to-write-a-Query/m-p/287907#M213313</link>
      <description>&lt;P&gt;Hi, I have a flowfile with this format:&lt;/P&gt;
&lt;P&gt;&amp;lt;td&amp;gt;Item1&amp;lt;/td&amp;gt;&lt;BR /&gt;&amp;lt;td class="dest"&amp;gt;50.3421&amp;lt;/td&amp;gt;&lt;BR /&gt;&amp;lt;td class="dest"&amp;gt;20.5547&amp;lt;/td&amp;gt;&lt;/P&gt;
&lt;P&gt;I need to write a query with the parameters, so I need to extract the numbers, with this for example:&lt;/P&gt;
&lt;P&gt;(\d{2}.\d{4})&lt;/P&gt;
&lt;P&gt;And put the 2 resultos in:&lt;/P&gt;
&lt;P&gt;Insert into table(a,b) VALUES($1,$2)&lt;/P&gt;
&lt;P&gt;How can I do this?&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tryed with replaceText but it's not what im looking for&lt;/P&gt;</description>
      <pubDate>Sun, 19 Jan 2020 02:36:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NIFI-Extract-data-from-flowfile-to-write-a-Query/m-p/287907#M213313</guid>
      <dc:creator>Alexandros</dc:creator>
      <dc:date>2020-01-19T02:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: NIFI - Extract data from  flowfile to write a Query</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NIFI-Extract-data-from-flowfile-to-write-a-Query/m-p/287982#M213367</link>
      <description>&lt;P&gt;The first thing that comes to mind is the Extract Text processor. It allows you to get (multiple) parts from the text and put it into attributes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;org.apache.nifi.processors.standard.ExtractText&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jan 2020 18:01:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NIFI-Extract-data-from-flowfile-to-write-a-Query/m-p/287982#M213367</guid>
      <dc:creator>DennisJaheruddi</dc:creator>
      <dc:date>2020-01-20T18:01:35Z</dc:date>
    </item>
    <item>
      <title>Re: NIFI - Extract data from  flowfile to write a Query</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NIFI-Extract-data-from-flowfile-to-write-a-Query/m-p/288112#M213460</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/70892"&gt;@Alexandros&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can accomplish this use ReplaceText with a more complex Java regular expression.&lt;BR /&gt;&lt;BR /&gt;The Replace Text is designed to replace every occurrence of the string matched by your java regular expression with the replacement value.&amp;nbsp; So you are probably seeing your replacement value inserted into your existing content twice.&lt;BR /&gt;&lt;BR /&gt;Try using the following java regular expression which will match your entire 3 lines of content:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;.*\n.*?(\d{2}.\d{4}).*?\n.*?(\d{2}.\d{4}).*&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Leave your replacement value as you already have it and make sure you have Evaluation mode still set to Entire text.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jan 2020 21:59:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NIFI-Extract-data-from-flowfile-to-write-a-Query/m-p/288112#M213460</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2020-01-22T21:59:13Z</dc:date>
    </item>
  </channel>
</rss>

