<?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: JoltTransformJSON  specification property fails with EL in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/JoltTransformJSON-specification-property-fails-with-EL/m-p/214714#M79159</link>
    <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/75257/oscarandreu.html" nodeid="75257"&gt;@Óscar Andreu&lt;/A&gt;, thank you for reporting the issue.&lt;/P&gt;&lt;P&gt;I was able to reproduce the issue. By looking at the code, there is a bug in how JoltTransformJSON validates the spec when it contains EL. The processor tries to check if the JoltSpec contains any custom transformation class to fail fast, but it fails to get a JoltSpec because EL can not return a valid spec at the validation phase.&lt;/P&gt;&lt;P&gt;I submitted an Apache JIRA for this and will try to fix it.&lt;/P&gt;&lt;P&gt;&lt;A href="https://issues.apache.org/jira/browse/NIFI-5268" target="_blank"&gt;https://issues.apache.org/jira/browse/NIFI-5268&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Tue, 05 Jun 2018 08:00:23 GMT</pubDate>
    <dc:creator>kkawamura</dc:creator>
    <dc:date>2018-06-05T08:00:23Z</dc:date>
    <item>
      <title>JoltTransformJSON  specification property fails with EL</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/JoltTransformJSON-specification-property-fails-with-EL/m-p/214713#M79158</link>
      <description>&lt;P&gt;
 I am suffering the same problem described 
 &lt;A href="https://community.hortonworks.com/questions/114923/jolttransformjson-wont-allow-attribute-el.html" rel="nofollow noopener noreferrer" target="_blank"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;
 I am setting the JoltSpecification property using expression language, but something it's going wrong.&lt;/P&gt;&lt;P&gt;
 My NiFi version is:&lt;/P&gt;&lt;P&gt;
 &lt;SMALL&gt;&lt;EM&gt;Powered by Apache NiFi - Version 1.5.0.3.1.1.0-35&lt;/EM&gt;&lt;/SMALL&gt;&lt;/P&gt;&lt;P&gt;
 &lt;SMALL&gt;02/25/2018 20:13:30 UTC&lt;/SMALL&gt;&lt;/P&gt;&lt;P&gt;
 &lt;SMALL&gt;&lt;EM&gt;Tagged nifi-1.5.0-RC1&lt;/EM&gt;&lt;/SMALL&gt;&lt;/P&gt;&lt;P&gt;
 &lt;SMALL&gt;&lt;EM&gt;&lt;BR /&gt;
 &lt;/EM&gt;&lt;/SMALL&gt;&lt;/P&gt;&lt;P&gt;
 &lt;SMALL&gt;&lt;/SMALL&gt;&lt;/P&gt;&lt;P&gt;
 I create a POC with an UpdateAttribute that is creating the attribute 'transformRules' with the value:&lt;/P&gt;
&lt;PRE&gt;[{"operation":"shift","spec":{"*":{"PartNr":"[&amp;amp;1].PartNumber","TcdMakeID":"[&amp;amp;1].Description","TcdCountryCode":"[&amp;amp;1].PartPrice"}}}]
&lt;/PRE&gt;&lt;P&gt;
 Then I have a JoltTransformJSON processor that uses this attribute as Jolt Specification, and the components looks like this:&lt;/P&gt;&lt;P&gt;
 &lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="74554-screenshot-1.png" style="width: 767px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/16387i5D71A2BF2CF2CFD1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="74554-screenshot-1.png" alt="74554-screenshot-1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;
 &lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="74555-screenshot-2.png" style="width: 683px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/16388iABA6001557EC3793/image-size/medium?v=v2&amp;amp;px=400" role="button" title="74555-screenshot-2.png" alt="74555-screenshot-2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;
 &lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="74556-screenshot-3.png" style="width: 573px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/16389i4EB0A7990324847D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="74556-screenshot-3.png" alt="74556-screenshot-3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;
 ideas about how can I solve this issue?&lt;/P&gt;&lt;P&gt;
 Thanks in advance.&lt;/P&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="74555-screenshot-2.png" style="width: 683px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/7584i346701E6176714BF/image-size/large?v=v2&amp;amp;px=999" role="button" title="74555-screenshot-2.png" alt="74555-screenshot-2.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="74556-screenshot-3.png" style="width: 573px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/7586i2371586D68C024D3/image-size/large?v=v2&amp;amp;px=999" role="button" title="74556-screenshot-3.png" alt="74556-screenshot-3.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="74554-screenshot-1.png" style="width: 767px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/7588iCAF0D4009705553A/image-size/large?v=v2&amp;amp;px=999" role="button" title="74554-screenshot-1.png" alt="74554-screenshot-1.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Fri, 16 Sep 2022 13:17:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/JoltTransformJSON-specification-property-fails-with-EL/m-p/214713#M79158</guid>
      <dc:creator>oscarandreu</dc:creator>
      <dc:date>2022-09-16T13:17:57Z</dc:date>
    </item>
    <item>
      <title>Re: JoltTransformJSON  specification property fails with EL</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/JoltTransformJSON-specification-property-fails-with-EL/m-p/214714#M79159</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/75257/oscarandreu.html" nodeid="75257"&gt;@Óscar Andreu&lt;/A&gt;, thank you for reporting the issue.&lt;/P&gt;&lt;P&gt;I was able to reproduce the issue. By looking at the code, there is a bug in how JoltTransformJSON validates the spec when it contains EL. The processor tries to check if the JoltSpec contains any custom transformation class to fail fast, but it fails to get a JoltSpec because EL can not return a valid spec at the validation phase.&lt;/P&gt;&lt;P&gt;I submitted an Apache JIRA for this and will try to fix it.&lt;/P&gt;&lt;P&gt;&lt;A href="https://issues.apache.org/jira/browse/NIFI-5268" target="_blank"&gt;https://issues.apache.org/jira/browse/NIFI-5268&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 08:00:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/JoltTransformJSON-specification-property-fails-with-EL/m-p/214714#M79159</guid>
      <dc:creator>kkawamura</dc:creator>
      <dc:date>2018-06-05T08:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: JoltTransformJSON  specification property fails with EL</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/JoltTransformJSON-specification-property-fails-with-EL/m-p/214715#M79160</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 18:20:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/JoltTransformJSON-specification-property-fails-with-EL/m-p/214715#M79160</guid>
      <dc:creator>oscarandreu</dc:creator>
      <dc:date>2018-06-05T18:20:21Z</dc:date>
    </item>
  </channel>
</rss>

