<?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: Can you retrieve specified attributes from a url with InvokeHTTP? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Can-you-retrieve-specified-attributes-from-a-url-with/m-p/130804#M55823</link>
    <description>&lt;P&gt;What do you mean by receiving attributes from a URL?  Do you mean query parameters? Or are you asking if there is a way to combine the fetching of the document via the URL and the extraction of JSON fields from the response?  If the latter, there isn't a way to combine those currently; NiFi is a highly modular system so fetching is really a different operation than extractions, hence the two separate processors.&lt;/P&gt;&lt;P&gt;What do you see as the issue in receiving the whole JSON response? The third-party libraries I'm familiar with still retrieve the whole HTTP response whether they expose it via an input stream or a big string or whatever. &lt;/P&gt;&lt;P&gt;After the initial fetch/response, if you don't touch the content after that, there won't be an operational impact with the respect to the size of the JSON response.  If you no longer need the content, you can replace it with something else (or nothing) using &lt;A target="_blank" href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi.processors.standard.ReplaceText/index.html"&gt;ReplaceText&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;One concept that is (hopefully) becoming more popular with web services is support for &lt;A target="_blank" href="http://graphql.org/"&gt;GraphQL&lt;/A&gt;. Using that paradigm and query language, you could ask for just the fields/structures you want, and you get the response you expect.&lt;/P&gt;</description>
    <pubDate>Wed, 01 Mar 2017 02:04:18 GMT</pubDate>
    <dc:creator>mburgess</dc:creator>
    <dc:date>2017-03-01T02:04:18Z</dc:date>
    <item>
      <title>Can you retrieve specified attributes from a url with InvokeHTTP?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Can-you-retrieve-specified-attributes-from-a-url-with/m-p/130803#M55822</link>
      <description>&lt;P&gt;Hi, currently i am using InvokeHTTP to retrieve a JSON file from a weather website. Then i use EvaluateJsonPath to take the attributes i need from the json file. Is it possible to just recieve the attributes from a url instead of receiving the whole json file? Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 01:40:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Can-you-retrieve-specified-attributes-from-a-url-with/m-p/130803#M55822</guid>
      <dc:creator>r_young</dc:creator>
      <dc:date>2017-03-01T01:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: Can you retrieve specified attributes from a url with InvokeHTTP?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Can-you-retrieve-specified-attributes-from-a-url-with/m-p/130804#M55823</link>
      <description>&lt;P&gt;What do you mean by receiving attributes from a URL?  Do you mean query parameters? Or are you asking if there is a way to combine the fetching of the document via the URL and the extraction of JSON fields from the response?  If the latter, there isn't a way to combine those currently; NiFi is a highly modular system so fetching is really a different operation than extractions, hence the two separate processors.&lt;/P&gt;&lt;P&gt;What do you see as the issue in receiving the whole JSON response? The third-party libraries I'm familiar with still retrieve the whole HTTP response whether they expose it via an input stream or a big string or whatever. &lt;/P&gt;&lt;P&gt;After the initial fetch/response, if you don't touch the content after that, there won't be an operational impact with the respect to the size of the JSON response.  If you no longer need the content, you can replace it with something else (or nothing) using &lt;A target="_blank" href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi.processors.standard.ReplaceText/index.html"&gt;ReplaceText&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;One concept that is (hopefully) becoming more popular with web services is support for &lt;A target="_blank" href="http://graphql.org/"&gt;GraphQL&lt;/A&gt;. Using that paradigm and query language, you could ask for just the fields/structures you want, and you get the response you expect.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 02:04:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Can-you-retrieve-specified-attributes-from-a-url-with/m-p/130804#M55823</guid>
      <dc:creator>mburgess</dc:creator>
      <dc:date>2017-03-01T02:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: Can you retrieve specified attributes from a url with InvokeHTTP?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Can-you-retrieve-specified-attributes-from-a-url-with/m-p/130805#M55824</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/641/mburgess.html" nodeid="641"&gt;@Matt Burgess&lt;/A&gt; yes its the latter. No issue with receiving the whole JSON, i was just trying to minimize the response if possible. &lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 03:44:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Can-you-retrieve-specified-attributes-from-a-url-with/m-p/130805#M55824</guid>
      <dc:creator>r_young</dc:creator>
      <dc:date>2017-03-01T03:44:26Z</dc:date>
    </item>
  </channel>
</rss>

