<?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 Starting with NiFi JOLT Transformations: create a list with a JSON inside in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Starting-with-NiFi-JOLT-Transformations-create-a-list-with-a/m-p/366161#M239496</link>
    <description>&lt;P&gt;I'm stating with Jolt Transformation Processor in NiFi and I so far to understand the Jolt logic.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to apply a simple transformation to insert a provided JSON into a list.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;provided JSON:&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp;Label1:Value1,&lt;BR /&gt;&amp;nbsp; &amp;nbsp;Label2:Value2&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;expected result:&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;GeneralLabel:[&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Label1:Value1,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Label2:Value2&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ]&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any clue about how to do it? In working with shift operation but without results.&lt;/P&gt;</description>
    <pubDate>Wed, 15 Mar 2023 15:15:21 GMT</pubDate>
    <dc:creator>rchaos</dc:creator>
    <dc:date>2023-03-15T15:15:21Z</dc:date>
    <item>
      <title>Starting with NiFi JOLT Transformations: create a list with a JSON inside</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Starting-with-NiFi-JOLT-Transformations-create-a-list-with-a/m-p/366161#M239496</link>
      <description>&lt;P&gt;I'm stating with Jolt Transformation Processor in NiFi and I so far to understand the Jolt logic.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to apply a simple transformation to insert a provided JSON into a list.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;provided JSON:&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp;Label1:Value1,&lt;BR /&gt;&amp;nbsp; &amp;nbsp;Label2:Value2&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;expected result:&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;GeneralLabel:[&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Label1:Value1,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Label2:Value2&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ]&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any clue about how to do it? In working with shift operation but without results.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2023 15:15:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Starting-with-NiFi-JOLT-Transformations-create-a-list-with-a/m-p/366161#M239496</guid>
      <dc:creator>rchaos</dc:creator>
      <dc:date>2023-03-15T15:15:21Z</dc:date>
    </item>
    <item>
      <title>Re: Starting with NiFi JOLT Transformations: create a list with a JSON inside</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Starting-with-NiFi-JOLT-Transformations-create-a-list-with-a/m-p/366162#M239497</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First of all make sure that the provided json is in valid format . What you provided in your example doesnt have double quotes surrounding the key\value as in&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"Label1": "Value1",&lt;BR /&gt;"Label2": "Value2"&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Assuming thejson is valid , you can use the following jolt spec to produce expected output:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[
  {
    "operation": "shift",
    "spec": {
      "*": "GeneralLabel[#].&amp;amp;"
    }
  }
]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To learn more about jolt transformation please refer to :&lt;/P&gt;&lt;P&gt;&lt;A href="https://jolt-demo.appspot.com/#inception" target="_blank"&gt;https://jolt-demo.appspot.com/#inception&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://intercom.help/godigibee/en/articles/4044359-transformer-getting-to-know-jolt" target="_blank"&gt;https://intercom.help/godigibee/en/articles/4044359-transformer-getting-to-know-jolt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If that helps please &lt;U&gt;&lt;STRONG&gt;accept&lt;/STRONG&gt; &lt;/U&gt;solution.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2023 15:36:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Starting-with-NiFi-JOLT-Transformations-create-a-list-with-a/m-p/366162#M239497</guid>
      <dc:creator>SAMSAL</dc:creator>
      <dc:date>2023-03-15T15:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: Starting with NiFi JOLT Transformations: create a list with a JSON inside</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Starting-with-NiFi-JOLT-Transformations-create-a-list-with-a/m-p/366165#M239498</link>
      <description>&lt;P&gt;Thank you very much SAMSAL, I apreciate it, specially the references you provide.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2023 15:43:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Starting-with-NiFi-JOLT-Transformations-create-a-list-with-a/m-p/366165#M239498</guid>
      <dc:creator>rchaos</dc:creator>
      <dc:date>2023-03-15T15:43:51Z</dc:date>
    </item>
  </channel>
</rss>

