<?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: comparing two flowfiles attributes one set at the time in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/comparing-two-flowfiles-attributes-one-set-at-the-time/m-p/214164#M176079</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/16412/simonjespersen.html" nodeid="16412"&gt;@Simon Jespersen&lt;/A&gt; happy to help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Thanks&lt;/P&gt;</description>
    <pubDate>Tue, 10 Oct 2017 21:21:19 GMT</pubDate>
    <dc:creator>ahadjidj</dc:creator>
    <dc:date>2017-10-10T21:21:19Z</dc:date>
    <item>
      <title>comparing two flowfiles attributes one set at the time</title>
      <link>https://community.cloudera.com/t5/Support-Questions/comparing-two-flowfiles-attributes-one-set-at-the-time/m-p/214161#M176076</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;When we ingest data we receive a control file for each data file. The controle file is a json file having a md5 value in it. &lt;/P&gt;&lt;P&gt;The md4 hash value should be the same as the file were currently ingesting other wise we will not ingest it. &lt;/P&gt;&lt;P&gt;So i have done following until now &lt;/P&gt;&lt;P&gt;1, Feching a data1.xml and data1_control.json from sftp server&lt;/P&gt;&lt;P&gt;2. used RouteOnAttrubute to split the flow up in two one for data1.xml file and one for the control file &lt;/P&gt;&lt;P&gt;3. used HashContent to get the3 md5 had value from the data12,xml file&lt;/P&gt;&lt;P&gt;4. used EvaluateJsonPath to get the md4 tag into a flowfile attribute &lt;/P&gt;&lt;P&gt;Now i got stuck, i tried to put my control file md5 value into PutDistributedMapCache and used detectDuplicate, but it wouldnt work &lt;/P&gt;&lt;P&gt;How can this be solved ? &lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2017 20:01:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/comparing-two-flowfiles-attributes-one-set-at-the-time/m-p/214161#M176076</guid>
      <dc:creator>simon_jespersen</dc:creator>
      <dc:date>2017-10-04T20:01:12Z</dc:date>
    </item>
    <item>
      <title>Re: comparing two flowfiles attributes one set at the time</title>
      <link>https://community.cloudera.com/t5/Support-Questions/comparing-two-flowfiles-attributes-one-set-at-the-time/m-p/214162#M176077</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/16412/simonjespersen.html" nodeid="16412"&gt;@Simon Jespersen&lt;/A&gt;&lt;P&gt;Try this approach:&lt;/P&gt;&lt;P&gt;- Fetch only the json files (data1_control.json). Use filter regex for this&lt;/P&gt;&lt;P&gt;- Use EvaluateJSONPath to get the md5 into an attribute hash1&lt;/P&gt;&lt;P&gt;- Use update attribute to generate the name of the data file and store it in an attribute file_to_get. Since you have the control name (data1_control.json), you can generate the file name (data1.xml) using NiFi expression langage.&lt;/P&gt;&lt;P&gt;- In the same flow, fetch the corresponding data file file_to_get with fetch processor. Now you have the content of this file in you flow file.&lt;/P&gt;&lt;P&gt;- Use HashContent to get the md5 and store in attribute hash2&lt;/P&gt;&lt;P&gt;- Use Route on attribute to keep only flow file having hash1 equals to hash2&lt;/P&gt;&lt;P&gt;I hope this helps&lt;/P&gt;</description>
      <pubDate>Sun, 08 Oct 2017 21:22:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/comparing-two-flowfiles-attributes-one-set-at-the-time/m-p/214162#M176077</guid>
      <dc:creator>ahadjidj</dc:creator>
      <dc:date>2017-10-08T21:22:01Z</dc:date>
    </item>
    <item>
      <title>Re: comparing two flowfiles attributes one set at the time</title>
      <link>https://community.cloudera.com/t5/Support-Questions/comparing-two-flowfiles-attributes-one-set-at-the-time/m-p/214163#M176078</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/2056/ahadjidj.html" nodeid="2056"&gt;@Abdelkrim Hadjidj&lt;/A&gt; This was exactly what i was looking for, thankyou very much for this beautiful and simple aproach &lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2017 21:15:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/comparing-two-flowfiles-attributes-one-set-at-the-time/m-p/214163#M176078</guid>
      <dc:creator>simon_jespersen</dc:creator>
      <dc:date>2017-10-10T21:15:25Z</dc:date>
    </item>
    <item>
      <title>Re: comparing two flowfiles attributes one set at the time</title>
      <link>https://community.cloudera.com/t5/Support-Questions/comparing-two-flowfiles-attributes-one-set-at-the-time/m-p/214164#M176079</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/16412/simonjespersen.html" nodeid="16412"&gt;@Simon Jespersen&lt;/A&gt; happy to help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2017 21:21:19 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/comparing-two-flowfiles-attributes-one-set-at-the-time/m-p/214164#M176079</guid>
      <dc:creator>ahadjidj</dc:creator>
      <dc:date>2017-10-10T21:21:19Z</dc:date>
    </item>
  </channel>
</rss>

