<?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>topic Re: lookup two csv pattern match query in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/lookup-two-csv-pattern-match-query/m-p/358460#M105975</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;try this..&lt;/P&gt;

&lt;P&gt;| inputlookup file1 | join type=outer field1 [| inputlookup file2 | eval field1=case(field3 == "application file", "application support", field3 == "cto maintenance", "technology maintenance") | stats count by field1] | table field1 field2 count&lt;/P&gt;</description>
    <pubDate>Fri, 10 Nov 2017 06:44:28 GMT</pubDate>
    <dc:creator>anjambha</dc:creator>
    <dc:date>2017-11-10T06:44:28Z</dc:date>
    <item>
      <title>lookup two csv pattern match query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/lookup-two-csv-pattern-match-query/m-p/358458#M105973</link>
      <description>&lt;P&gt;I have a requirement like this&lt;/P&gt;

&lt;P&gt;from file1.csv lookup file i am getting 2 fields&lt;BR /&gt;
field1                                     field2    &lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;"application support"                 1&lt;BR /&gt;&lt;BR /&gt;
"technology maintenance"        3&lt;BR /&gt;
"enterprise platform"           4&lt;/P&gt;

&lt;P&gt;file2.csv file has many fields out of which one of the field name field3 has data like this&lt;/P&gt;

&lt;H2&gt;filed3  &lt;/H2&gt;

&lt;P&gt;"application file"&lt;BR /&gt;
"cto maintenance"&lt;BR /&gt;
"application file"&lt;BR /&gt;
"application file"&lt;BR /&gt;
"application file"&lt;BR /&gt;
"enterprise security"&lt;BR /&gt;
"enterprise security"&lt;/P&gt;

&lt;P&gt;Now if field1="application support" search for word "application" in file2.csv in field3 And since we got a pattern match for word application now i need the count saying how many "application file" values are there in field3 of file2.csv and get the resulting table as below. &lt;/P&gt;

&lt;P&gt;field1                                    field2         field3&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;"application support"                 1      4&lt;BR /&gt;
"technology maintenance"        3               1&lt;BR /&gt;
"enterprise platform"           4               2&lt;/P&gt;</description>
      <pubDate>Thu, 09 Nov 2017 15:57:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/lookup-two-csv-pattern-match-query/m-p/358458#M105973</guid>
      <dc:creator>surekhasplunk</dc:creator>
      <dc:date>2017-11-09T15:57:12Z</dc:date>
    </item>
    <item>
      <title>Re: lookup two csv pattern match query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/lookup-two-csv-pattern-match-query/m-p/358459#M105974</link>
      <description>&lt;P&gt;Couple of questions:&lt;BR /&gt;
(1) Is this something you're doing once and could handle a multi-step process, or something you want to run over and over?&lt;BR /&gt;
(2) How many entries are in file1? A small handful, or a very long list?&lt;BR /&gt;
(3) In all of your examples, the position of the word in &lt;CODE&gt;field1&lt;/CODE&gt; from file1.csv matches the position of matching words in &lt;CODE&gt;field3&lt;/CODE&gt;. For example, "application support" matches against "application file" - would it also match against "file application" if such an entry existed in &lt;CODE&gt;field3&lt;/CODE&gt;?&lt;/P&gt;</description>
      <pubDate>Thu, 09 Nov 2017 18:04:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/lookup-two-csv-pattern-match-query/m-p/358459#M105974</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2017-11-09T18:04:43Z</dc:date>
    </item>
    <item>
      <title>Re: lookup two csv pattern match query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/lookup-two-csv-pattern-match-query/m-p/358460#M105975</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;try this..&lt;/P&gt;

&lt;P&gt;| inputlookup file1 | join type=outer field1 [| inputlookup file2 | eval field1=case(field3 == "application file", "application support", field3 == "cto maintenance", "technology maintenance") | stats count by field1] | table field1 field2 count&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2017 06:44:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/lookup-two-csv-pattern-match-query/m-p/358460#M105975</guid>
      <dc:creator>anjambha</dc:creator>
      <dc:date>2017-11-10T06:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: lookup two csv pattern match query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/lookup-two-csv-pattern-match-query/m-p/358461#M105976</link>
      <description>&lt;P&gt;Thank you very much @anjambha it worked &lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2017 12:59:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/lookup-two-csv-pattern-match-query/m-p/358461#M105976</guid>
      <dc:creator>surekhasplunk</dc:creator>
      <dc:date>2017-11-10T12:59:02Z</dc:date>
    </item>
  </channel>
</rss>

