<?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 i extract attribute from json file using nifi in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/how-i-extract-attribute-from-json-file-using-nifi/m-p/108546#M71401</link>
    <description>&lt;P&gt;I use  gethttp processor to stream data using http request, so I need to get attribute from file json that I get from the first request and use it for another request, how I can do this with the existing nife processor.any help is appreciated &lt;/P&gt;</description>
    <pubDate>Thu, 03 Mar 2016 22:10:26 GMT</pubDate>
    <dc:creator>nejmhadjmbarek</dc:creator>
    <dc:date>2016-03-03T22:10:26Z</dc:date>
    <item>
      <title>how i extract attribute from json file using nifi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-i-extract-attribute-from-json-file-using-nifi/m-p/108546#M71401</link>
      <description>&lt;P&gt;I use  gethttp processor to stream data using http request, so I need to get attribute from file json that I get from the first request and use it for another request, how I can do this with the existing nife processor.any help is appreciated &lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2016 22:10:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-i-extract-attribute-from-json-file-using-nifi/m-p/108546#M71401</guid>
      <dc:creator>nejmhadjmbarek</dc:creator>
      <dc:date>2016-03-03T22:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: how i extract attribute from json file using nifi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-i-extract-attribute-from-json-file-using-nifi/m-p/108547#M71402</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/2068/nejmhadjmbarek.html" nodeid="2068"&gt;@nejm hadj&lt;/A&gt; You can parse a JSON with the EvaluateJsonPath processor. You will need to make sure that the information that your getHTTP processor outputs is strictly JSON, then feed it into EvaluateJsonPath. From there, you can reference the fields in the JSON and forward them on to other processors.&lt;/P&gt;&lt;P&gt;&lt;A href="https://raw.githubusercontent.com/abajwa-hw/ambari-nifi-service/master/demofiles/Twitter_Dashboard.xml"&gt;Twitter_Dashboard.xml&lt;/A&gt; is a Twitter processing template that has a good example of evaluating JSON files in it. Import the template into your NiFi dashboard then instantiate it to check out the EvaluateJsonPath processor to see how it's done:&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2016 23:25:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-i-extract-attribute-from-json-file-using-nifi/m-p/108547#M71402</guid>
      <dc:creator>emaxwell</dc:creator>
      <dc:date>2016-03-03T23:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: how i extract attribute from json file using nifi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-i-extract-attribute-from-json-file-using-nifi/m-p/108548#M71403</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/98/emaxwell.html" nodeid="98"&gt;@emaxwell&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Hi emaxwell,&lt;/P&gt;&lt;P&gt;I have a same task to extract attributes from json file via gethttp with EvaluateJsonPath processor.   However, the resulting data from the processor do not limit to the attributes, it pulled all attributes the original json data has.  Is this meant to be so?&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;Shannon&lt;/P&gt;&lt;P&gt;
&lt;A rel="user" href="https://community.cloudera.com/users/98/emaxwell.html" nodeid="98"&gt;&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2016 07:48:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-i-extract-attribute-from-json-file-using-nifi/m-p/108548#M71403</guid>
      <dc:creator>Luos</dc:creator>
      <dc:date>2016-04-12T07:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: how i extract attribute from json file using nifi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-i-extract-attribute-from-json-file-using-nifi/m-p/108549#M71404</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/3621/sluo.html" nodeid="3621"&gt;@shannon luo&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You can use an EvaluateJSONPath processor to pull out the fields that you want in the flow. You will create a parameter for each field in the JSON you wish to put on the output flow file. The name will be what you want the field to be called on the output, and the value will be an expression equating to the field in the input JSON (e.g. Name = twitter.name, Value = $.user.screen_name takes the input user:screen_name value from the JSON and creates a variable called twitter.name on the output flow file).&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Erik&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2016 03:14:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-i-extract-attribute-from-json-file-using-nifi/m-p/108549#M71404</guid>
      <dc:creator>emaxwell</dc:creator>
      <dc:date>2016-04-13T03:14:22Z</dc:date>
    </item>
    <item>
      <title>Re: how i extract attribute from json file using nifi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-i-extract-attribute-from-json-file-using-nifi/m-p/108550#M71405</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/98/emaxwell.html" nodeid="98" target="_blank"&gt;@emaxwell&lt;/A&gt;&lt;/P&gt;&lt;P&gt;That was what I did.  but still end up pulling all attribute.  Going to Provenance, it showed EvaluateJsonPath pulled empty strings on all specified attribute.  Would you be so kind an tell me where I got it wrong? -- I tried to pull "subject" property using value $.response.Matches.M&lt;/P&gt;&lt;P&gt;atch.Subject, $.Matches.Match.Subject,  $.Match.Subject, and $.Subject.  None of those worked.  The source data looks like (see below):&lt;/P&gt;
&lt;P&gt;Thanks !&lt;/P&gt;&lt;P&gt;Shannon&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="3387-json.png" style="width: 1594px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/23413i50B1BEB8511A6A01/image-size/medium?v=v2&amp;amp;px=400" role="button" title="3387-json.png" alt="3387-json.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 11:39:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-i-extract-attribute-from-json-file-using-nifi/m-p/108550#M71405</guid>
      <dc:creator>Luos</dc:creator>
      <dc:date>2019-08-19T11:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: how i extract attribute from json file using nifi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-i-extract-attribute-from-json-file-using-nifi/m-p/108551#M71406</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/3621/sluo.html" nodeid="3621" target="_blank"&gt;@shannon luo&lt;/A&gt; &lt;/P&gt;&lt;P&gt;What are the configuration attributes of your EvaluateJSONPath processor? Is you destination set to "flowfile-content" or "flowfile-attribute"? I have a processor set up to evaluate Twitter JSON, and the destination is set to "flowfile-attribute" with a number of attributes identified. Can you take a look at the attached image and see if your attributes are configured similarly?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="3394-screen-shot-2016-04-12-at-44429-pm.png" style="width: 1610px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/23412i57A5600610F4BFEC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="3394-screen-shot-2016-04-12-at-44429-pm.png" alt="3394-screen-shot-2016-04-12-at-44429-pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 11:39:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-i-extract-attribute-from-json-file-using-nifi/m-p/108551#M71406</guid>
      <dc:creator>emaxwell</dc:creator>
      <dc:date>2019-08-19T11:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: how i extract attribute from json file using nifi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-i-extract-attribute-from-json-file-using-nifi/m-p/108552#M71407</link>
      <description>&lt;P&gt;&lt;A href="https://community.hortonworks.com/users/98/emaxwell.html" rel="nofollow noopener noreferrer" target="_blank"&gt;@emaxwell&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Yes, that was the template I used as the base for development.  I used flowfile-attibute.  Here is the screenshot for the properties.   None of those properties added works. &lt;/P&gt;&lt;P&gt;Edit:  May be this is what caused problem:  Match has an array as its value.    I tried $.response.Request.Actual.query, it worked fine.  Do you know what to do to parse value from "Match"?  (without going to a ExecuteScript).&lt;/P&gt;&lt;P&gt;Thanks so much for helping!&lt;/P&gt;&lt;P&gt;Shannon&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="3401-evaluatejsonpath.png" style="width: 940px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/23411iD838B5793A1BEE08/image-size/medium?v=v2&amp;amp;px=400" role="button" title="3401-evaluatejsonpath.png" alt="3401-evaluatejsonpath.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 11:39:07 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-i-extract-attribute-from-json-file-using-nifi/m-p/108552#M71407</guid>
      <dc:creator>Luos</dc:creator>
      <dc:date>2019-08-19T11:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: how i extract attribute from json file using nifi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-i-extract-attribute-from-json-file-using-nifi/m-p/108553#M71408</link>
      <description>&lt;P&gt;It would be nice to have a processor that specifically creates a list of attributes coming out of a JSON message.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2016 23:46:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-i-extract-attribute-from-json-file-using-nifi/m-p/108553#M71408</guid>
      <dc:creator>randybovay</dc:creator>
      <dc:date>2016-09-12T23:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: how i extract attribute from json file using nifi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-i-extract-attribute-from-json-file-using-nifi/m-p/108554#M71409</link>
      <description>&lt;P&gt;Hi, I am converting the output of ExecuteSQL processor in JSON format and trying the above steps to extract some fetched column values from it. For that I have follow the same steps mentioned here to make it work but its not working. Plz suggest. My main idea to implement is to extract some column from executeSQL  and based on that value I need to do some file ingestion. Help will be appreciated &lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2016 19:41:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-i-extract-attribute-from-json-file-using-nifi/m-p/108554#M71409</guid>
      <dc:creator>sameer_khanwalk</dc:creator>
      <dc:date>2016-09-14T19:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: how i extract attribute from json file using nifi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-i-extract-attribute-from-json-file-using-nifi/m-p/108555#M71410</link>
      <description>&lt;P&gt;hi is there any way to extract the attributes without nifi ! i mean , i need to extract an attribute from a collection of tweet i already have !&lt;/P&gt;</description>
      <pubDate>Sun, 18 Sep 2016 14:16:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-i-extract-attribute-from-json-file-using-nifi/m-p/108555#M71410</guid>
      <dc:creator>kameswaran0631</dc:creator>
      <dc:date>2016-09-18T14:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: how i extract attribute from json file using nifi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-i-extract-attribute-from-json-file-using-nifi/m-p/108556#M71411</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;ExecuteSQL &amp;gt; SplitAvro &amp;gt; ConvertAvrotoJSON &amp;gt; EvaluateJsonPath&lt;/P&gt;&lt;P&gt;SplitAvro creates individual Avro records&lt;/P&gt;&lt;P&gt;ConvertAvrotoJSON creates JSON from Avro&lt;/P&gt;&lt;P&gt;EvaluateJsonPath allows you to create new FlowFile attributes from JSON path.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2016 23:21:19 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-i-extract-attribute-from-json-file-using-nifi/m-p/108556#M71411</guid>
      <dc:creator>bhagan</dc:creator>
      <dc:date>2016-09-30T23:21:19Z</dc:date>
    </item>
    <item>
      <title>Re: how i extract attribute from json file using nifi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-i-extract-attribute-from-json-file-using-nifi/m-p/108557#M71412</link>
      <description>&lt;P&gt;Hi, We have extracted the required fields from Json file as below.&lt;/P&gt;&lt;P&gt;It is not with only one processor. It is with two processors. &lt;/P&gt;&lt;P&gt;1. EvaluateJsonPath : What ever the configurations above mentioned are correct. This processor will validate whether this field exists or not. If not, then it will show that filed value as null.&lt;/P&gt;&lt;P&gt;2. AttributesToJSON : In the Attributes list property, give what ever the fields you want to pull (with comma separated) from the fields added in the EvaluateJsonPath processor.&lt;/P&gt;&lt;P&gt;[say you have added field1 to 6 in EvaluateJsonPath and then you want only field 1,3,4. Then give field1,field3,field4 in the Attributes list in the AttributesToJSON processor.]&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2017 00:14:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-i-extract-attribute-from-json-file-using-nifi/m-p/108557#M71412</guid>
      <dc:creator>seenu0104</dc:creator>
      <dc:date>2017-08-08T00:14:48Z</dc:date>
    </item>
    <item>
      <title>Re: how i extract attribute from json file using nifi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-i-extract-attribute-from-json-file-using-nifi/m-p/348355#M235354</link>
      <description>&lt;P&gt;Hello, I have a json flow file as follows:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Hashem1980_2-1658342808789.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/34973iC5708EA4B13F8C1E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Hashem1980_2-1658342808789.png" alt="Hashem1980_2-1658342808789.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used: EvaluateJsonPath:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Hashem1980_0-1658342535446.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/34971iD08C6D70FC9583B0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Hashem1980_0-1658342535446.png" alt="Hashem1980_0-1658342535446.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But the result is: &amp;lt; Empty string set&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Hashem1980_1-1658342610303.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/34972iAC525A4A111FD8CD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Hashem1980_1-1658342610303.png" alt="Hashem1980_1-1658342610303.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help and guide.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2022 18:46:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-i-extract-attribute-from-json-file-using-nifi/m-p/348355#M235354</guid>
      <dc:creator>Hashem1980</dc:creator>
      <dc:date>2022-07-20T18:46:54Z</dc:date>
    </item>
    <item>
      <title>Re: how i extract attribute from json file using nifi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-i-extract-attribute-from-json-file-using-nifi/m-p/350262#M235934</link>
      <description>&lt;P&gt;You are using an array, this is why you got null values. You have 2 options:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Change the expressions to $[0].ARRIVAL_DATE and $[0].BOOK_ID, and it will work&lt;/LI&gt;&lt;LI&gt;Read the file and split the array using the SplitJson processor - set JsonPath expression to: $, and connect the SplitJson processor to your EvaluateJsonPath processor and it should work.&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Wed, 17 Aug 2022 19:48:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-i-extract-attribute-from-json-file-using-nifi/m-p/350262#M235934</guid>
      <dc:creator>monmai</dc:creator>
      <dc:date>2022-08-17T19:48:53Z</dc:date>
    </item>
  </channel>
</rss>

