<?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: Escaping EL Issue in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Escaping-EL-Issue/m-p/373062#M241475</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Thank you &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/35454"&gt;@MattWho&lt;/a&gt;, the trick worked! Sadly, it worked for this simple case, but for more complex cases we couldn't find a pattern to apply it. However, we found another workaround by using literals like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%"&gt;&lt;STRONG&gt;Expression&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="50%"&gt;&lt;STRONG&gt;Value&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;&lt;PRE&gt;{&lt;BR /&gt; "${literal('$${key1}')}": "${literal('$${value1}')}",&lt;BR /&gt; "key2": "${literal('$${value2}')}",&lt;BR /&gt; "${literal('$${key3}')}": "value3",&lt;BR /&gt; "key4": "${literal('value4')}"&lt;BR /&gt;}&lt;/PRE&gt;&lt;/TD&gt;&lt;TD width="50%"&gt;&lt;PRE&gt;{&lt;BR /&gt; "${key1}": "${value1}",&lt;BR /&gt; "key2": "${value2}",&lt;BR /&gt; "${key3}": "value3",&lt;BR /&gt; "key4": "value4"&lt;BR /&gt;}&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;It's a nasty hack, but it gets the job done! Thanks again for your help and for filling a bug report.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 21 Jun 2023 23:47:32 GMT</pubDate>
    <dc:creator>jisaitua</dc:creator>
    <dc:date>2023-06-21T23:47:32Z</dc:date>
    <item>
      <title>Escaping EL Issue</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Escaping-EL-Issue/m-p/373048#M241469</link>
      <description>&lt;P&gt;We are having escaping issues in some expressions. Just an example (using Nifi 1.21.0):&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%"&gt;&lt;STRONG&gt;Expression&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="50%"&gt;&lt;STRONG&gt;Value&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;&lt;P&gt;{"$${key}": "value"}&lt;/P&gt;&lt;/TD&gt;&lt;TD width="50%"&gt;&lt;P&gt;{"${key}": "value"}&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;&lt;P&gt;{"$${key}": "${literal('value')}"}&lt;/P&gt;&lt;/TD&gt;&lt;TD width="50%"&gt;{"$${key}": "value"}&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;As one can see, the second expression is not escaping the dollar sign as it should (from the docs, see &lt;A href="https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#escaping" target="_self"&gt;"Escaping Expression Language"&lt;/A&gt;), and just stays as "$$".&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Any comments/hints would be much appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2023 18:15:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Escaping-EL-Issue/m-p/373048#M241469</guid>
      <dc:creator>jisaitua</dc:creator>
      <dc:date>2023-06-21T18:15:24Z</dc:date>
    </item>
    <item>
      <title>Re: Escaping EL Issue</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Escaping-EL-Issue/m-p/373053#M241473</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/105301"&gt;@jisaitua&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Definitely some weird unexpected behavior there. I was able to reproduce your issue, as well as some other unexpected behavior around same area.&lt;BR /&gt;&lt;BR /&gt;As a workaround to your specific issue, the following NiFi Expression Language (NEL) will get you what you are looking for:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{${literal('')}"$${key}":"${literal('value')}"}&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;I also filed an Apache NiFi jira for this issue:&lt;BR /&gt;&lt;A href="https://issues.apache.org/jira/browse/NIFI-11738" target="_blank"&gt;https://issues.apache.org/jira/browse/NIFI-11738&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I reproduced on an Apache NiFi 1.18 cluster I have running, so it is not an issue that just recently appeared.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic"&gt;If you found that the provided solution(s) assisted you with your query, please take a moment to login and click&lt;/FONT&gt;&amp;nbsp;&lt;FONT face="arial black,avant garde" color="#FF0000"&gt;Accept as Solution&amp;nbsp;&lt;/FONT&gt;&lt;FONT face="batang,apple gothic" color="#000000"&gt;below each response that helped.&lt;BR /&gt;&lt;BR /&gt;Thank you,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" color="#000000"&gt;Matt&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2023 20:46:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Escaping-EL-Issue/m-p/373053#M241473</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2023-06-21T20:46:18Z</dc:date>
    </item>
    <item>
      <title>Re: Escaping EL Issue</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Escaping-EL-Issue/m-p/373062#M241475</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thank you &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/35454"&gt;@MattWho&lt;/a&gt;, the trick worked! Sadly, it worked for this simple case, but for more complex cases we couldn't find a pattern to apply it. However, we found another workaround by using literals like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%"&gt;&lt;STRONG&gt;Expression&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="50%"&gt;&lt;STRONG&gt;Value&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;&lt;PRE&gt;{&lt;BR /&gt; "${literal('$${key1}')}": "${literal('$${value1}')}",&lt;BR /&gt; "key2": "${literal('$${value2}')}",&lt;BR /&gt; "${literal('$${key3}')}": "value3",&lt;BR /&gt; "key4": "${literal('value4')}"&lt;BR /&gt;}&lt;/PRE&gt;&lt;/TD&gt;&lt;TD width="50%"&gt;&lt;PRE&gt;{&lt;BR /&gt; "${key1}": "${value1}",&lt;BR /&gt; "key2": "${value2}",&lt;BR /&gt; "${key3}": "value3",&lt;BR /&gt; "key4": "value4"&lt;BR /&gt;}&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;It's a nasty hack, but it gets the job done! Thanks again for your help and for filling a bug report.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2023 23:47:32 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Escaping-EL-Issue/m-p/373062#M241475</guid>
      <dc:creator>jisaitua</dc:creator>
      <dc:date>2023-06-21T23:47:32Z</dc:date>
    </item>
  </channel>
</rss>

