<?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: add  outside value to array using jolt in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/add-outside-value-to-array-using-jolt/m-p/377448#M243267</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/99104"&gt;@PradNiFi1236&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;Is the following spec what you are looking for:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[

  {
    "operation": "shift",
    "spec": {
      "DatiRiepilogo": {
        "AliquotaIVA": {
          "*": {
            "@(2,Natura)": "FatturaElettronicaBody.DatiBeniServizi.DatiRiepilogo[&amp;amp;1].Natura",
            "@": "FatturaElettronicaBody.DatiBeniServizi.DatiRiepilogo[&amp;amp;1].AliquotaIVA"
          }
        },
        "ImponibileImporto": {
          "*": {
            "@": "FatturaElettronicaBody.DatiBeniServizi.DatiRiepilogo[&amp;amp;1].ImponibileImporto"
          }
        },
        "Imposta": {
          "*": {
            "@": "FatturaElettronicaBody.DatiBeniServizi.DatiRiepilogo[&amp;amp;1].Imposta"
          }
        }
      }
    }
}
]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 10 Oct 2023 17:40:18 GMT</pubDate>
    <dc:creator>SAMSAL</dc:creator>
    <dc:date>2023-10-10T17:40:18Z</dc:date>
    <item>
      <title>add  outside value to array using jolt</title>
      <link>https://community.cloudera.com/t5/Support-Questions/add-outside-value-to-array-using-jolt/m-p/377435#M243260</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;Could you please help in getting below value to be splitted across the array , the value outside of arrray&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Input:&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;&lt;BR /&gt;"DatiRiepilogo": {&lt;BR /&gt;"Natura": "N3.5",&lt;BR /&gt;"AliquotaIVA": [&lt;BR /&gt;"22.00",&lt;BR /&gt;"5.00"&lt;BR /&gt;],&lt;BR /&gt;"ImponibileImporto": [&lt;BR /&gt;"215.43",&lt;BR /&gt;"6.70"&lt;BR /&gt;],&lt;BR /&gt;"Imposta": [&lt;BR /&gt;"47.39",&lt;BR /&gt;"0.34"&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SPEC:&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"operation": "shift",&lt;BR /&gt;"spec": {&lt;BR /&gt;&lt;BR /&gt;"DatiRiepilogo": {&lt;BR /&gt;"Natura":{&lt;/P&gt;&lt;P&gt;"*":{&lt;BR /&gt;"@(2,Natura)": "FatturaElettronicaBody.DatiBeniServizi.DatiRiepilogo[&amp;amp;1].Natura"&lt;/P&gt;&lt;P&gt;}},&lt;BR /&gt;&lt;BR /&gt;"AliquotaIVA": {&lt;BR /&gt;&lt;BR /&gt;"@": "FatturaElettronicaBody.DatiBeniServizi.DatiRiepilogo[&amp;amp;1].AliquotaIVA",&lt;BR /&gt;"*": {&lt;BR /&gt;"@": "FatturaElettronicaBody.DatiBeniServizi.DatiRiepilogo[&amp;amp;1].AliquotaIVA"&lt;BR /&gt;}&lt;BR /&gt;},&lt;BR /&gt;"ImponibileImporto": {&lt;BR /&gt;"@": "FatturaElettronicaBody.DatiBeniServizi.DatiRiepilogo[&amp;amp;1].ImponibileImporto",&lt;BR /&gt;"*": {&lt;BR /&gt;"@": "FatturaElettronicaBody.DatiBeniServizi.DatiRiepilogo[&amp;amp;1].ImponibileImporto"&lt;BR /&gt;}&lt;BR /&gt;},&lt;BR /&gt;"Imposta": {&lt;BR /&gt;"@": "FatturaElettronicaBody.DatiBeniServizi.DatiRiepilogo[&amp;amp;1].Imposta",&lt;BR /&gt;"*": {&lt;BR /&gt;"@": "FatturaElettronicaBody.DatiBeniServizi.DatiRiepilogo[&amp;amp;1].Imposta"&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Expected Output:&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"FatturaElettronicaBody" : {&lt;BR /&gt;"DatiBeniServizi" : {&lt;BR /&gt;&lt;BR /&gt;"DatiRiepilogo" : [ {&lt;/P&gt;&lt;P&gt;"Natura": "N3.5",&lt;BR /&gt;"AliquotaIVA" : "22.00",&lt;BR /&gt;"ImponibileImporto" : "215.43",&lt;BR /&gt;"Imposta" : "47.39"&lt;BR /&gt;}, {&lt;/P&gt;&lt;P&gt;"Natura": "N3.5",&lt;BR /&gt;"AliquotaIVA" : "5.00",&lt;BR /&gt;"ImponibileImporto" : "6.70",&lt;BR /&gt;"Imposta" : "0.34"&lt;BR /&gt;} ]&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/80381"&gt;@SAMSAL&lt;/a&gt;&amp;nbsp;, &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/35454"&gt;@MattWho&lt;/a&gt;&amp;nbsp;&amp;nbsp;Could you please help on this&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 15:28:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/add-outside-value-to-array-using-jolt/m-p/377435#M243260</guid>
      <dc:creator>PradNiFi1236</dc:creator>
      <dc:date>2023-10-10T15:28:01Z</dc:date>
    </item>
    <item>
      <title>Re: add  outside value to array using jolt</title>
      <link>https://community.cloudera.com/t5/Support-Questions/add-outside-value-to-array-using-jolt/m-p/377448#M243267</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/99104"&gt;@PradNiFi1236&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;Is the following spec what you are looking for:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[

  {
    "operation": "shift",
    "spec": {
      "DatiRiepilogo": {
        "AliquotaIVA": {
          "*": {
            "@(2,Natura)": "FatturaElettronicaBody.DatiBeniServizi.DatiRiepilogo[&amp;amp;1].Natura",
            "@": "FatturaElettronicaBody.DatiBeniServizi.DatiRiepilogo[&amp;amp;1].AliquotaIVA"
          }
        },
        "ImponibileImporto": {
          "*": {
            "@": "FatturaElettronicaBody.DatiBeniServizi.DatiRiepilogo[&amp;amp;1].ImponibileImporto"
          }
        },
        "Imposta": {
          "*": {
            "@": "FatturaElettronicaBody.DatiBeniServizi.DatiRiepilogo[&amp;amp;1].Imposta"
          }
        }
      }
    }
}
]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 17:40:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/add-outside-value-to-array-using-jolt/m-p/377448#M243267</guid>
      <dc:creator>SAMSAL</dc:creator>
      <dc:date>2023-10-10T17:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: add  outside value to array using jolt</title>
      <link>https://community.cloudera.com/t5/Support-Questions/add-outside-value-to-array-using-jolt/m-p/377452#M243271</link>
      <description>&lt;P&gt;Thank you So much&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/80381"&gt;@SAMSAL&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;if the input is array of values then its coming good, How about if input is&amp;nbsp; nonarray value something like this&lt;BR /&gt;{&lt;BR /&gt;"DatiBeniServizi": {&lt;BR /&gt;"DatiRiepilogo": {&lt;BR /&gt;"AliquotaIVA": "22.00",&lt;BR /&gt;"ImponibileImporto": "367.94",&lt;BR /&gt;"Imposta": "80.95"&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i think without [&amp;amp;1] will work but how to accept both nonarray and array input using single spec?&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 18:32:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/add-outside-value-to-array-using-jolt/m-p/377452#M243271</guid>
      <dc:creator>PradNiFi1236</dc:creator>
      <dc:date>2023-10-10T18:32:23Z</dc:date>
    </item>
    <item>
      <title>Re: add  outside value to array using jolt</title>
      <link>https://community.cloudera.com/t5/Support-Questions/add-outside-value-to-array-using-jolt/m-p/377456#M243273</link>
      <description>&lt;P&gt;I dont think you can use the same jolt spec for two different schema. Jolt spec doesnt allow you to use the same key multiple times. You have to know beforehand what schema are you getting then direct to different jolt transformation processor , or store the spec dynamically in an attribute to pass it to single jolt processor&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 19:13:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/add-outside-value-to-array-using-jolt/m-p/377456#M243273</guid>
      <dc:creator>SAMSAL</dc:creator>
      <dc:date>2023-10-10T19:13:35Z</dc:date>
    </item>
  </channel>
</rss>

