<?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 How to Extract query param from nifi in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-Extract-query-param-from-nifi/m-p/210911#M74331</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I had been automate get request based on user query param using nifi with help of InvokeHttp.Here is the example;&lt;/P&gt;&lt;P&gt;http://aaa.com/q="bigdata"&amp;amp;api_key=""&lt;/P&gt;&lt;P&gt;http://aaa.com/q="apple"&amp;amp;api_key=""&lt;/P&gt;&lt;P&gt;I did split text using line by line read and invoke http processor using fetch those response as json format. My question is before invokehttp processor, i want to extract those query param values those query values are static. I need to know which query param using i got response. Please give me some suggestion. It would much helpful.  &lt;/P&gt;&lt;P&gt;Thanks. &lt;/P&gt;</description>
    <pubDate>Tue, 06 Feb 2018 19:15:44 GMT</pubDate>
    <dc:creator>varun_rathinam</dc:creator>
    <dc:date>2018-02-06T19:15:44Z</dc:date>
    <item>
      <title>How to Extract query param from nifi</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-Extract-query-param-from-nifi/m-p/210911#M74331</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I had been automate get request based on user query param using nifi with help of InvokeHttp.Here is the example;&lt;/P&gt;&lt;P&gt;http://aaa.com/q="bigdata"&amp;amp;api_key=""&lt;/P&gt;&lt;P&gt;http://aaa.com/q="apple"&amp;amp;api_key=""&lt;/P&gt;&lt;P&gt;I did split text using line by line read and invoke http processor using fetch those response as json format. My question is before invokehttp processor, i want to extract those query param values those query values are static. I need to know which query param using i got response. Please give me some suggestion. It would much helpful.  &lt;/P&gt;&lt;P&gt;Thanks. &lt;/P&gt;</description>
      <pubDate>Tue, 06 Feb 2018 19:15:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-Extract-query-param-from-nifi/m-p/210911#M74331</guid>
      <dc:creator>varun_rathinam</dc:creator>
      <dc:date>2018-02-06T19:15:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to Extract query param from nifi</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-Extract-query-param-from-nifi/m-p/210912#M74332</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/14885/varunrathinam.html" nodeid="14885" target="_blank"&gt;@Varun  R&lt;/A&gt;
&lt;/P&gt;&lt;P&gt;After &lt;STRONG&gt;split text&lt;/STRONG&gt; processor use &lt;STRONG&gt;extract text &lt;/STRONG&gt;processor and add &lt;STRONG&gt;new property&lt;/STRONG&gt; with matching &lt;STRONG&gt;regex&lt;/STRONG&gt;, then the extracted attribute will be added as the flowfile attribute.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Example:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;After split text you are having each address in a flowfile as like this &lt;A href="http://aaa.com/q=" rel="nofollow noopener noreferrer" target="_blank"&gt;http://aaa.com/q="bigdata"≈i_key&lt;/A&gt;="", now you want to know which query param value(ex:bigdata) has been used.&lt;/P&gt;&lt;P&gt;Then use extract text add new property&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;query_values
&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;q="(.*?)"&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="60420-extracttext.png" style="width: 504px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/16691iE5312FB45EF2A4AA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="60420-extracttext.png" alt="60420-extracttext.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;output flowfile:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="60421-queryparam.png" style="width: 372px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/16692iD35C4BBBC1F04DDC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="60421-queryparam.png" alt="60421-queryparam.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Once the flowfile processed by extract text processor it matches the regex and adds the attribute query_values to the flowfile.&lt;/P&gt;&lt;P&gt;By this way you are going to know which query param values are used to get response.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;If the Answer helped to resolve your issue, &lt;STRONG&gt;Click on Accept button below to accept the answer&lt;/STRONG&gt;, That would be great help to Community users to find solution quickly for these kind of issues.&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 04:02:17 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-Extract-query-param-from-nifi/m-p/210912#M74332</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2019-08-18T04:02:17Z</dc:date>
    </item>
  </channel>
</rss>

