<?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 JoltTransformJSON - Several Changes in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/NiFi-JoltTransformJSON-Several-Changes/m-p/333893#M231554</link>
    <description>&lt;P&gt;Not sure if this issue persist.&lt;BR /&gt;Attached is one way, using only one-phase shift operation:&lt;BR /&gt;1. date and env are flow file attributes which should be predefined when debugging under the JOLTTransformJSON Advanced Mode.&lt;BR /&gt;2. When dealing with JOLT Spec, we can predefine some constant which starts with &lt;STRONG&gt;"#" for the unexist value scope&amp;nbsp;&lt;/STRONG&gt;"#&amp;lt;constant&amp;gt;", in that way we can then handle the rest match-and-shift work .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[ {
  "operation" : "shift",
  "spec" : {
    "logTypeCode" : {
      "FIN" : {
        "#END_OF_TESTING" : {
			"$":"body.&amp;amp;3",
			"#END_OF_TESTING":"customValue.logTypeCode"
        }
      }
    },
    "*" : "body.&amp;amp;",
    "#${date}" : "header.date",
    "#${env}" : {
      "$" : "customValue.ENV"
    }
  }
} ]

==============
      OR
==============

[ {
  "operation" : "shift",
  "spec" : {
    "logTypeCode" : {
      "FIN" : {
        "#END_OF_TESTING" : {
			"$":"body.logTypeCode",
			"#END_OF_TESTING":"customValue.logTypeCode"
        }
      }
    },
    "*" : "body.&amp;amp;",
    "#${date}" : "header.date",
    "#${env}" : {
      "$" : "customValue.ENV"
    }
  }
} ]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Fri, 14 Jan 2022 22:40:46 GMT</pubDate>
    <dc:creator>OliverGong</dc:creator>
    <dc:date>2022-01-14T22:40:46Z</dc:date>
  </channel>
</rss>

