<?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 Json data using routeonattributeto to split attribute or attribute value in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/nifi-Json-data-using-routeonattributeto-to-split-attribute/m-p/280273#M208767</link>
    <description>&lt;P&gt;In&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;EvaluateJsonPath&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;processor add new property to extract&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;event_id&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;value from the flowfile.&lt;/P&gt;&lt;P&gt;if flowfile is not having&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;event_id&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;then nifi adds empty value to the attribute.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;EvaluateJsonPath Configs:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://i.stack.imgur.com/9yinS.png" target="_blank" rel="nofollow noopener noreferrer"&gt;&lt;IMG src="https://ip1.i.lithium.com/f7cf60f0796a1d49ee3bc73dbbbcb7dd7b33ad1d/68747470733a2f2f692e737461636b2e696d6775722e636f6d2f3979696e532e706e67" border="0" alt="enter image description here" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Then by using&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;RouteOnAttribute&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;processor we can check the attribute value and route the flowfile accordingly.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RouteOnAttribute Configs:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;not null value&lt;/P&gt;&lt;PRE&gt;${event_id:isEmpty():not()}&lt;/PRE&gt;&lt;P&gt;null value&lt;/P&gt;&lt;PRE&gt;${event_id:isEmpty()}&lt;/PRE&gt;&lt;P&gt;&lt;A href="https://i.stack.imgur.com/Y6X3u.png" target="_blank" rel="nofollow noopener noreferrer"&gt;&lt;IMG src="https://ip1.i.lithium.com/8ef0a5ce3757726621bf9538da25e398935ae168/68747470733a2f2f692e737461636b2e696d6775722e636f6d2f59365833752e706e67" border="0" alt="enter image description here" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Then use null value and not null value relationships for further processing..!!&lt;/P&gt;</description>
    <pubDate>Wed, 16 Oct 2019 03:12:26 GMT</pubDate>
    <dc:creator>Shu_ashu</dc:creator>
    <dc:date>2019-10-16T03:12:26Z</dc:date>
    <item>
      <title>nifi Json data using routeonattributeto to split attribute or attribute value</title>
      <link>https://community.cloudera.com/t5/Support-Questions/nifi-Json-data-using-routeonattributeto-to-split-attribute/m-p/280251#M208751</link>
      <description>&lt;DIV class="MessageSubjectIcons "&gt;
&lt;H2 class="message-subject"&gt;&lt;SPAN class="lia-message-read"&gt;&lt;A id="link_13" class="page-link lia-link-navigation lia-custom-event" href="https://community.cloudera.com/t5/Support-Questions/nifi-Json-data-using-routeonattributeto-to-split-attribute/m-p/280251" target="_blank"&gt;nifi Json data using routeonattributeto to split a...&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/H2&gt;
&lt;/DIV&gt;
&lt;DIV class="lia-message-body"&gt;
&lt;DIV class="lia-message-body-content"&gt;
&lt;DIV class="votecell post-layout--left"&gt;
&lt;DIV class="js-voting-container grid fd-column ai-stretch gs4 fc-black-200"&gt;&lt;SPAN&gt;I am currently working to consume data using Nifi related to tealium event stream and load into HDFS.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Need help in filtering the data when source misses to send data for json attribute.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="js-voting-container grid fd-column ai-stretch gs4 fc-black-200"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="postcell post-layout--right"&gt;
&lt;DIV class="post-text"&gt;
&lt;P&gt;{"account":"newt","twitter:description":"Discover when your favorite New TV shows and hosts are being shown. ","og:locale":"en_US","dcterms:publisher":"New TV","original-source":"&lt;A href="http://www.newtv.com/%22,%22og:url%22:%22www.newtv.com/show/program-guide%22%7D%7D,%22post_time%22:%222019-10-09" target="_blank" rel="noopener nofollow noopener noreferrer"&gt;www.newtv.com/","og:url":"www.newtv.com/show/program-guide"}},"post_time":"2019-10-09&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;11:27:46","useragent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36","&lt;STRONG&gt;event_id&lt;/STRONG&gt;":"12345"}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sample above message. I am currently stuck with filtering the data when source misses to send data for event_id attribute.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Current Nifi flow, Consume Kafka -&amp;gt; Evaluate Json Path -&amp;gt; Jolttransform Json -&amp;gt; Evaluate Json Path-&amp;gt; RouteOnAttribute -&amp;gt; Merge Content -&amp;gt; Evaluate Json Path -&amp;gt; Update attribute -&amp;gt; PutHDFS -&amp;gt;MoveHDFS&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Need help how to split data using RouteOnAttribute to split missing event_id or event_id value to two different flows.&lt;/P&gt;
&lt;P&gt;Flow 1 - To split available event_id attribute.&lt;/P&gt;
&lt;P&gt;Flow 2 -&amp;nbsp;M&lt;SPAN&gt;issing Event_ID or Event_ID attribute values to treat as error and load into different flow&lt;/SPAN&gt;.&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 15 Oct 2019 21:16:00 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/nifi-Json-data-using-routeonattributeto-to-split-attribute/m-p/280251#M208751</guid>
      <dc:creator>Deenag</dc:creator>
      <dc:date>2019-10-15T21:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: nifi Json data using routeonattributeto to split attribute or attribute value</title>
      <link>https://community.cloudera.com/t5/Support-Questions/nifi-Json-data-using-routeonattributeto-to-split-attribute/m-p/280273#M208767</link>
      <description>&lt;P&gt;In&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;EvaluateJsonPath&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;processor add new property to extract&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;event_id&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;value from the flowfile.&lt;/P&gt;&lt;P&gt;if flowfile is not having&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;event_id&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;then nifi adds empty value to the attribute.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;EvaluateJsonPath Configs:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://i.stack.imgur.com/9yinS.png" target="_blank" rel="nofollow noopener noreferrer"&gt;&lt;IMG src="https://ip1.i.lithium.com/f7cf60f0796a1d49ee3bc73dbbbcb7dd7b33ad1d/68747470733a2f2f692e737461636b2e696d6775722e636f6d2f3979696e532e706e67" border="0" alt="enter image description here" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Then by using&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;RouteOnAttribute&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;processor we can check the attribute value and route the flowfile accordingly.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RouteOnAttribute Configs:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;not null value&lt;/P&gt;&lt;PRE&gt;${event_id:isEmpty():not()}&lt;/PRE&gt;&lt;P&gt;null value&lt;/P&gt;&lt;PRE&gt;${event_id:isEmpty()}&lt;/PRE&gt;&lt;P&gt;&lt;A href="https://i.stack.imgur.com/Y6X3u.png" target="_blank" rel="nofollow noopener noreferrer"&gt;&lt;IMG src="https://ip1.i.lithium.com/8ef0a5ce3757726621bf9538da25e398935ae168/68747470733a2f2f692e737461636b2e696d6775722e636f6d2f59365833752e706e67" border="0" alt="enter image description here" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Then use null value and not null value relationships for further processing..!!&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2019 03:12:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/nifi-Json-data-using-routeonattributeto-to-split-attribute/m-p/280273#M208767</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2019-10-16T03:12:26Z</dc:date>
    </item>
    <item>
      <title>Re: nifi Json data using routeonattributeto to split attribute or attribute value</title>
      <link>https://community.cloudera.com/t5/Support-Questions/nifi-Json-data-using-routeonattributeto-to-split-attribute/m-p/280339#M208793</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/55311"&gt;@Shu_ashu&lt;/a&gt;&amp;nbsp;Thank you for the solution.&lt;/P&gt;&lt;P&gt;I have got the issue resolved as it is working as expected.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2019 12:07:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/nifi-Json-data-using-routeonattributeto-to-split-attribute/m-p/280339#M208793</guid>
      <dc:creator>Deenag</dc:creator>
      <dc:date>2019-10-16T12:07:12Z</dc:date>
    </item>
  </channel>
</rss>

