<?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 NIFI Scan attribute using dictionary in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/NIFI-Scan-attribute-using-dictionary/m-p/181352#M143573</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I have been searching but the information by way of examples is a little thin on the ground (for me anyway) to make much headway.&lt;BR /&gt;Simply put I have a flow that decompresses a zipped file (tar.gz) - actually double compressed as this is the format i receive it in.&lt;BR /&gt;Sometime the file is corrupt which I can detect by following the failure path. However, I wish to put the failures into a 'Failure' folder for checking at a later time. The problem is some file in the flow are regular zip files and i want to ignore those. &lt;BR /&gt;So I am using scan attribute processor and using regular expressions to match the discitionary.&lt;BR /&gt;&lt;BR /&gt;the dictionary text file just contains: /.*.tar.gz/&lt;/P&gt;&lt;P&gt;(do I need the back slashes here?)&lt;/P&gt;&lt;P&gt;The properties are set:&lt;/P&gt;&lt;P&gt;Dictionary File: D:\NIFI\nifi-1.6.0\Dictionary\Matches.txt&lt;BR /&gt;Attribute Pattern: .*&lt;BR /&gt;Match Criteria: At least 1 must match&lt;BR /&gt;Dictionary Filter Pattern: empty string set&lt;/P&gt;&lt;P&gt;Is there something I am missing here?&lt;BR /&gt;I have tried varies changes to the above but still not getting a match!&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;</description>
    <pubDate>Tue, 10 Jul 2018 23:20:02 GMT</pubDate>
    <dc:creator>imagegrill</dc:creator>
    <dc:date>2018-07-10T23:20:02Z</dc:date>
    <item>
      <title>NIFI Scan attribute using dictionary</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NIFI-Scan-attribute-using-dictionary/m-p/181352#M143573</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I have been searching but the information by way of examples is a little thin on the ground (for me anyway) to make much headway.&lt;BR /&gt;Simply put I have a flow that decompresses a zipped file (tar.gz) - actually double compressed as this is the format i receive it in.&lt;BR /&gt;Sometime the file is corrupt which I can detect by following the failure path. However, I wish to put the failures into a 'Failure' folder for checking at a later time. The problem is some file in the flow are regular zip files and i want to ignore those. &lt;BR /&gt;So I am using scan attribute processor and using regular expressions to match the discitionary.&lt;BR /&gt;&lt;BR /&gt;the dictionary text file just contains: /.*.tar.gz/&lt;/P&gt;&lt;P&gt;(do I need the back slashes here?)&lt;/P&gt;&lt;P&gt;The properties are set:&lt;/P&gt;&lt;P&gt;Dictionary File: D:\NIFI\nifi-1.6.0\Dictionary\Matches.txt&lt;BR /&gt;Attribute Pattern: .*&lt;BR /&gt;Match Criteria: At least 1 must match&lt;BR /&gt;Dictionary Filter Pattern: empty string set&lt;/P&gt;&lt;P&gt;Is there something I am missing here?&lt;BR /&gt;I have tried varies changes to the above but still not getting a match!&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2018 23:20:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NIFI-Scan-attribute-using-dictionary/m-p/181352#M143573</guid>
      <dc:creator>imagegrill</dc:creator>
      <dc:date>2018-07-10T23:20:02Z</dc:date>
    </item>
    <item>
      <title>Re: NIFI Scan attribute using dictionary</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NIFI-Scan-attribute-using-dictionary/m-p/181353#M143574</link>
      <description>&lt;P&gt;Ah yes, and the flow file name is: 837c9563-a138-446a-bb86-29763e60b95eTestPrint.tar.gz&lt;BR /&gt;Where 837c9563-a138-446a-bb86-29763e60b95e is the UUID  - added to make the flow file ID unique. Necessary for the bigger picture I am working on.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2018 23:27:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NIFI-Scan-attribute-using-dictionary/m-p/181353#M143574</guid>
      <dc:creator>imagegrill</dc:creator>
      <dc:date>2018-07-10T23:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: NIFI Scan attribute using dictionary</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NIFI-Scan-attribute-using-dictionary/m-p/181354#M143575</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/87223/imagegrill.html" nodeid="87223"&gt;@Paul Burger&lt;/A&gt;&lt;P&gt;Scan Attribute processor matches exactly the content of Dictionary File depending on Match Criteria value i.e as your dictionary file having&lt;STRONG&gt; /.*.tar.gz&lt;/STRONG&gt; then if your file is exactly &lt;STRONG&gt;/.*.tar.gz&lt;/STRONG&gt; ,it goes to matched relationship.&lt;/P&gt;&lt;P&gt;If you want to filter out the filenames that are having &lt;STRONG&gt;.tar.gz&lt;/STRONG&gt; then use &lt;STRONG&gt;RouteOnAttribute &lt;/STRONG&gt;processor and add new property to check the files&lt;/P&gt;&lt;PRE&gt;${filename:contains(".tar.gz")} //look for is there .tar.gz in filename value&lt;/PRE&gt;&lt;PRE&gt;${filename:substringAfter("."):equals("tar.gz")} //get the filename value after . and match with tar.gz&lt;/PRE&gt;&lt;P&gt;By using either of the above expression languages we are checking for .tar.gz in filename value and the matching flowfiles will routes to the newly added property.&lt;/P&gt;&lt;P&gt;if you want to negate to the above expression then use &lt;STRONG&gt;:not()&lt;/STRONG&gt; function&lt;/P&gt;&lt;P&gt;For more details refer to &lt;A href="https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#not" target="_blank"&gt;this&lt;/A&gt; link regarding nifi expression language.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2018 16:15:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NIFI-Scan-attribute-using-dictionary/m-p/181354#M143575</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2018-07-11T16:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: NIFI Scan attribute using dictionary</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NIFI-Scan-attribute-using-dictionary/m-p/181355#M143576</link>
      <description>&lt;P&gt;ok, so couldn't get the solution to work using the scan attribute processor with the dictionary even if I put the exact file name in the dictionary! I removed UUID for test purposes so was left with just TestPrint.tar.gz,&lt;BR /&gt;However, the RoueOnAttribute processor worked for my purposes nicely so will go with that and tackle dictionaries at some point in the future.&lt;BR /&gt;&lt;BR /&gt;Paul&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2018 17:08:40 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NIFI-Scan-attribute-using-dictionary/m-p/181355#M143576</guid>
      <dc:creator>imagegrill</dc:creator>
      <dc:date>2018-07-11T17:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: NIFI Scan attribute using dictionary</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NIFI-Scan-attribute-using-dictionary/m-p/181356#M143577</link>
      <description>&lt;P&gt;Hi @Paul Burger Please ping me if you want me to connect you with some of the engineers. I am responsible for Nokia and would be very happy to try and help out. Kind regards, Andy agriffin@hortonworks.com&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jul 2018 17:04:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NIFI-Scan-attribute-using-dictionary/m-p/181356#M143577</guid>
      <dc:creator>agriffin</dc:creator>
      <dc:date>2018-07-12T17:04:49Z</dc:date>
    </item>
  </channel>
</rss>

