<?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: Compare two field values and get matching third value from table in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Compare-two-field-values-and-get-matching-third-value-from-table/m-p/316574#M94729</link>
    <description>&lt;P&gt;Thanks a lot for the quick response! Works as intended.&lt;/P&gt;</description>
    <pubDate>Mon, 10 Apr 2017 07:14:25 GMT</pubDate>
    <dc:creator>ckunath</dc:creator>
    <dc:date>2017-04-10T07:14:25Z</dc:date>
    <item>
      <title>Compare two field values and get matching third value from table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-two-field-values-and-get-matching-third-value-from-table/m-p/316572#M94727</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;i'm trying to do a search and then compare my result with a table from a .csv file (contains a table with ids and text for each id). &lt;BR /&gt;
My search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo eventid=200 | append [|inputlookup ids.csv] | table eventid id text
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This gets me a table like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eventid | id | text
10      |    |
        | 1  | text1
        | 2  | text2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;[...]&lt;/P&gt;

&lt;P&gt;How can I change my search to make the table look like this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;id | text
10 | text10
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2017 06:31:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-two-field-values-and-get-matching-third-value-from-table/m-p/316572#M94727</guid>
      <dc:creator>ckunath</dc:creator>
      <dc:date>2017-04-10T06:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two field values and get matching third value from table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-two-field-values-and-get-matching-third-value-from-table/m-p/316573#M94728</link>
      <description>&lt;P&gt;If you want to get a matching value from a table, you need to use the &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.5.3/SearchReference/Lookup"&gt;lookup&lt;/A&gt; command.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=foo eventid=200 
| lookup ids.csv eventid as id OUTPUT id text
| table eventid id text
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Apr 2017 07:06:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-two-field-values-and-get-matching-third-value-from-table/m-p/316573#M94728</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2017-04-10T07:06:16Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two field values and get matching third value from table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-two-field-values-and-get-matching-third-value-from-table/m-p/316574#M94729</link>
      <description>&lt;P&gt;Thanks a lot for the quick response! Works as intended.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2017 07:14:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-two-field-values-and-get-matching-third-value-from-table/m-p/316574#M94729</guid>
      <dc:creator>ckunath</dc:creator>
      <dc:date>2017-04-10T07:14:25Z</dc:date>
    </item>
  </channel>
</rss>

