<?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 Whitelisting using LookupAttribute in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Whitelisting-using-LookupAttribute/m-p/182453#M77843</link>
    <description>&lt;P&gt;I am ingesting data from Kafka and then splitting out a JSON field.  I then want to check that said fields content is in a whitelist that is kept in HDFS.  I am looking at ScanAttribute and it seems like the thing I need except it can't read from HDFS.  I tried reading from HDFS and then copying the file to local disk but that had some problems.  Is there a better way?&lt;/P&gt;&lt;UL&gt;
&lt;LI&gt;KafkaConsume&lt;/LI&gt;&lt;LI&gt;SplitJsonPaths ($.someid)&lt;/LI&gt;&lt;LI&gt;ScanAttribute from HDFS (${someid})
&lt;UL&gt;
&lt;LI&gt;Drop if ${someid} text isn't in HDFS file (new-line-delimited text file)&lt;/LI&gt;&lt;LI&gt;Succeed if ${someid} text is in HDFS file&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Chad&lt;/P&gt;</description>
    <pubDate>Tue, 01 May 2018 10:22:37 GMT</pubDate>
    <dc:creator>lbmission</dc:creator>
    <dc:date>2018-05-01T10:22:37Z</dc:date>
    <item>
      <title>Whitelisting using LookupAttribute</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Whitelisting-using-LookupAttribute/m-p/182453#M77843</link>
      <description>&lt;P&gt;I am ingesting data from Kafka and then splitting out a JSON field.  I then want to check that said fields content is in a whitelist that is kept in HDFS.  I am looking at ScanAttribute and it seems like the thing I need except it can't read from HDFS.  I tried reading from HDFS and then copying the file to local disk but that had some problems.  Is there a better way?&lt;/P&gt;&lt;UL&gt;
&lt;LI&gt;KafkaConsume&lt;/LI&gt;&lt;LI&gt;SplitJsonPaths ($.someid)&lt;/LI&gt;&lt;LI&gt;ScanAttribute from HDFS (${someid})
&lt;UL&gt;
&lt;LI&gt;Drop if ${someid} text isn't in HDFS file (new-line-delimited text file)&lt;/LI&gt;&lt;LI&gt;Succeed if ${someid} text is in HDFS file&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Chad&lt;/P&gt;</description>
      <pubDate>Tue, 01 May 2018 10:22:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Whitelisting-using-LookupAttribute/m-p/182453#M77843</guid>
      <dc:creator>lbmission</dc:creator>
      <dc:date>2018-05-01T10:22:37Z</dc:date>
    </item>
    <item>
      <title>Re: Whitelisting using LookupAttribute</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Whitelisting-using-LookupAttribute/m-p/182454#M77844</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/78241/lbmission.html" nodeid="78241"&gt;@Chad Shaw&lt;/A&gt;&lt;/P&gt;&lt;P&gt;How often your whitelist is updated? if not often, you can use NiFi to ingest it from HDFS, to store it in NiFi local server and use it with ScanAttribute.&lt;/P&gt;</description>
      <pubDate>Tue, 01 May 2018 19:28:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Whitelisting-using-LookupAttribute/m-p/182454#M77844</guid>
      <dc:creator>ahadjidj</dc:creator>
      <dc:date>2018-05-01T19:28:20Z</dc:date>
    </item>
    <item>
      <title>Re: Whitelisting using LookupAttribute</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Whitelisting-using-LookupAttribute/m-p/182455#M77845</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I have broken out the import piece now so it doesn't run in line which is fine for now.  The problem I have now is that ScanAttribute doesn't support expression language so I can't give it a variable to scan for... any suggestions?&lt;/P&gt;</description>
      <pubDate>Tue, 01 May 2018 22:49:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Whitelisting-using-LookupAttribute/m-p/182455#M77845</guid>
      <dc:creator>lbmission</dc:creator>
      <dc:date>2018-05-01T22:49:38Z</dc:date>
    </item>
    <item>
      <title>Re: Whitelisting using LookupAttribute</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Whitelisting-using-LookupAttribute/m-p/182456#M77846</link>
      <description>&lt;P&gt;Can you give an example please? I can not see where the problem is&lt;/P&gt;</description>
      <pubDate>Tue, 01 May 2018 22:52:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Whitelisting-using-LookupAttribute/m-p/182456#M77846</guid>
      <dc:creator>ahadjidj</dc:creator>
      <dc:date>2018-05-01T22:52:13Z</dc:date>
    </item>
    <item>
      <title>Re: Whitelisting using LookupAttribute</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Whitelisting-using-LookupAttribute/m-p/182457#M77847</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="72529-screen-shot-2018-05-01-at-101117-am.png" style="width: 1062px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/19164iDAF73AC1F5DA504D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="72529-screen-shot-2018-05-01-at-101117-am.png" alt="72529-screen-shot-2018-05-01-at-101117-am.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here is what I am doing currently.  Essentially based on a field from the EvaluateJsonPath, lets call it ${someid}, I need to match that variable to a whitelist.  That whitelist exists in HDFS but it could be loaded to local file or some cache if needed.  If there is a match then I want to HTTPPost if not then I will drop the message.  The issue is that ScanAttribute will only accept a regular expression and not a variable using expression language ${someid}.&lt;/P&gt;&lt;P&gt;I'm wondering if there is a better way.  Maybe read in the whitelist to a CSV service and then lookup record... not sure how best to use a whitelist in Nifi.&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 08:54:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Whitelisting-using-LookupAttribute/m-p/182457#M77847</guid>
      <dc:creator>lbmission</dc:creator>
      <dc:date>2019-08-18T08:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: Whitelisting using LookupAttribute</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Whitelisting-using-LookupAttribute/m-p/182458#M77848</link>
      <description>&lt;P&gt;I ended up getting my whitelist to work.  Here is what I did:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Put whitelist into csv format&lt;/LI&gt;&lt;LI&gt;Create a SimpleCSVLookupService&lt;/LI&gt;&lt;LI&gt;Use LookupAttribute to pull value of ${someid}.  Returns null if nothing matched&lt;/LI&gt;&lt;LI&gt;Use RouteAttribute to test whither ${someid} equal the LookupAttribute&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;There might be a better way where I don't have to use RouteAttribute to compare two variables but this is working for me as of now.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="72531-screen-shot-2018-05-01-at-14829-pm.png" style="width: 1235px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/19163iF545EDA5BF5CF03D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="72531-screen-shot-2018-05-01-at-14829-pm.png" alt="72531-screen-shot-2018-05-01-at-14829-pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://community.cloudera.com/t5/image/serverpage/image-id/7681i2F2B99FB869488F9/image-size/large?v=1.0&amp;amp;px=999" border="0" alt="screen-shot-2018-05-01-at-14829-pm.png" title="screen-shot-2018-05-01-at-14829-pm.png" /&gt;</description>
      <pubDate>Sun, 18 Aug 2019 08:54:14 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Whitelisting-using-LookupAttribute/m-p/182458#M77848</guid>
      <dc:creator>lbmission</dc:creator>
      <dc:date>2019-08-18T08:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: Whitelisting using LookupAttribute</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Whitelisting-using-LookupAttribute/m-p/182459#M77849</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;&lt;A href="https://community.hortonworks.com/users/2056/ahadjidj.html"&gt;&lt;/A&gt; Your article was helpful as well:&lt;BR /&gt;&lt;A href="https://community.hortonworks.com/articles/140231/data-flow-enrichment-with-nifi-part-2-lookupattrib.html"&gt;https://community.hortonworks.com/articles/140231/data-flow-enrichment-with-nifi-part-2-lookupattrib.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 May 2018 03:21:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Whitelisting-using-LookupAttribute/m-p/182459#M77849</guid>
      <dc:creator>lbmission</dc:creator>
      <dc:date>2018-05-02T03:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: Whitelisting using LookupAttribute</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Whitelisting-using-LookupAttribute/m-p/182460#M77850</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/78241/lbmission.html" nodeid="78241"&gt;@Chad Shaw&lt;/A&gt; glad that you find the article useful &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 May 2018 03:38:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Whitelisting-using-LookupAttribute/m-p/182460#M77850</guid>
      <dc:creator>ahadjidj</dc:creator>
      <dc:date>2018-05-02T03:38:54Z</dc:date>
    </item>
  </channel>
</rss>

