<?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: How to get specific fields from Json in Nifi JoltTransformJson? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/How-to-get-specific-fields-from-Json-in-Nifi/m-p/242324#M204127</link>
    <description>&lt;P&gt;I solved the problem. I used this solution;&lt;/P&gt;&lt;PRE&gt;[
  {
    "operation": "shift",
    "spec": {
    	"*": {
        	"nodeId": "node_ids",
          	"status": "node_status"
        }
    }
  }
]&lt;/PRE&gt;</description>
    <pubDate>Thu, 17 Jan 2019 03:21:41 GMT</pubDate>
    <dc:creator>sosyalmedya_ogu</dc:creator>
    <dc:date>2019-01-17T03:21:41Z</dc:date>
    <item>
      <title>How to get specific fields from Json in Nifi JoltTransformJson?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-get-specific-fields-from-Json-in-Nifi/m-p/242323#M204126</link>
      <description>&lt;P&gt;I have nifi cluster summarry json data like this;&lt;/P&gt;&lt;PRE&gt;[{
	"nodeId": "29bed24c-6d73-4652-930b-0065cad4ef66",
	"address": "b1518aec7e38",
	"apiPort": 8080,
	"status": "CONNECTED",
	"heartbeat": "01/16/2019 16:24:32 UTC",
	"roles": ["Primary Node", "Cluster Coordinator"],
	"activeThreadCount": 0,
	"queued": "0 / 0 bytes",
	"events": [{
		"timestamp": "01/16/2019 15:21:50 UTC",
		"category": "INFO",
		"message": "Received first heartbeat from connecting node. Node connected."
	}, {
		"timestamp": "01/16/2019 15:21:48 UTC",
		"category": "INFO",
		"message": "Connection requested from existing node. Setting status to connecting."
	}],
	"nodeStartTime": "01/16/2019 15:20:44 UTC"
   },
   {
	"nodeId": "22aofpp4-87rf-asf4-930b-0065cad4ef66",
	"address": "b67uf98tkl5",
	"apiPort": 8080,
	"status": "CONNECTED",
	"heartbeat": "01/16/2019 16:24:32 UTC",
	"roles": [],
	"activeThreadCount": 0,
	"queued": "0 / 0 bytes",
	"events": [{
		"timestamp": "01/16/2019 15:21:50 UTC",
		"category": "INFO",
		"message": "Received first heartbeat from connecting node. Node connected."
	}, {
		"timestamp": "01/16/2019 15:21:48 UTC",
		"category": "INFO",
		"message": "Connection requested from existing node. Setting status to connecting."
	}],
	"nodeStartTime": "01/16/2019 15:20:44 UTC"
}]&lt;/PRE&gt;&lt;P&gt;I want only nodeId and status fields from this json. Output what i want;&lt;/P&gt;&lt;PRE&gt;{
   "nodeIds": ["node1Id", "node2Id"],
   "status": ["node1Status", "node2Status"]
}&lt;/PRE&gt;&lt;P&gt;For example output what i want;&lt;/P&gt;&lt;PRE&gt;{
   "nodeIds": ["29bed24c-6d73-4652-930b-0065cad4ef66", "22aofpp4-87rf-asf4-930b-0065cad4ef66"],
   "status": ["CONNECTED", "CONNECTED"]
}&lt;/PRE&gt;&lt;P&gt;But I couldn't do Jolt Specification for this. How can i do this?&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jan 2019 03:21:40 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-get-specific-fields-from-Json-in-Nifi/m-p/242323#M204126</guid>
      <dc:creator>sosyalmedya_ogu</dc:creator>
      <dc:date>2019-01-17T03:21:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to get specific fields from Json in Nifi JoltTransformJson?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-get-specific-fields-from-Json-in-Nifi/m-p/242324#M204127</link>
      <description>&lt;P&gt;I solved the problem. I used this solution;&lt;/P&gt;&lt;PRE&gt;[
  {
    "operation": "shift",
    "spec": {
    	"*": {
        	"nodeId": "node_ids",
          	"status": "node_status"
        }
    }
  }
]&lt;/PRE&gt;</description>
      <pubDate>Thu, 17 Jan 2019 03:21:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-get-specific-fields-from-Json-in-Nifi/m-p/242324#M204127</guid>
      <dc:creator>sosyalmedya_ogu</dc:creator>
      <dc:date>2019-01-17T03:21:41Z</dc:date>
    </item>
  </channel>
</rss>

