<?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 default_match for multiple columns? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Lookup-default-match-for-multiple-columns/m-p/191519#M55152</link>
    <description>&lt;P&gt;As I could not get the &lt;CODE&gt;WILDCARD&lt;/CODE&gt; approach to work (the lookup always fails and the fields end up as NULL), I used:&lt;/P&gt;

&lt;PRE&gt;
 | fillnull value="Unknown network error" network_status_title 
 | fillnull value="Network Error" network_status_type 
 | fillnull value="Failure" network_status_ok 
&lt;/PRE&gt;

&lt;P&gt;instead in the query; e.g. when the lookup fails supply default values manually. &lt;/P&gt;

&lt;P&gt;Although the &lt;CODE&gt;WILDCARD&lt;/CODE&gt; should have worked (I probably didn't re-load the dataset) I've since had confirmation from Splunk that using &lt;CODE&gt;fillnull&lt;/CODE&gt; is better from a performance point of view here.&lt;/P&gt;</description>
    <pubDate>Tue, 13 Jan 2015 12:00:54 GMT</pubDate>
    <dc:creator>mjpieters</dc:creator>
    <dc:date>2015-01-13T12:00:54Z</dc:date>
    <item>
      <title>Lookup default_match for multiple columns?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-default-match-for-multiple-columns/m-p/191518#M55151</link>
      <description>&lt;P&gt;We are using a CSV to map one field to two more:&lt;/P&gt;

&lt;PRE&gt;
status,status_title,status_type,status_ok
-,Network connection successful,Network success,Success
D,DNS lookup failure,Network failure,Failure
&lt;/PRE&gt;

&lt;P&gt;etc, with a lookup:&lt;/P&gt;

&lt;PRE&gt;
lookup network_status_codes status AS receiver_network_status OUTPUTNEW
    status_title AS network_status_title,
    status_type AS network_status_type,
    status_ok AS network_status_ok
&lt;/PRE&gt;

&lt;P&gt;How can I handle falling back to defaults for all three columns? The &lt;CODE&gt;default_match&lt;/CODE&gt; field appears to only let me provide &lt;EM&gt;one&lt;/EM&gt; fallback; I don't think I can use:&lt;/P&gt;

&lt;PRE&gt;
[network_status_codes]
filename = network_status_codes.csv
min_matches = 1
default_match = Unknown network error,Network failure,Failure
&lt;/PRE&gt;

&lt;P&gt;here.&lt;/P&gt;

&lt;P&gt;Should I use a wildcard match instead? E.g. add a row:&lt;/P&gt;

&lt;PRE&gt;
*,Unknown network error,Network failure,Failure
&lt;/PRE&gt;

&lt;P&gt;then set the match type:&lt;/P&gt;

&lt;PRE&gt;
match_type = WILDCARD(status)
&lt;/PRE&gt;

&lt;P&gt;to make this work?&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jan 2015 11:27:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-default-match-for-multiple-columns/m-p/191518#M55151</guid>
      <dc:creator>mjpieters</dc:creator>
      <dc:date>2015-01-12T11:27:03Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup default_match for multiple columns?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-default-match-for-multiple-columns/m-p/191519#M55152</link>
      <description>&lt;P&gt;As I could not get the &lt;CODE&gt;WILDCARD&lt;/CODE&gt; approach to work (the lookup always fails and the fields end up as NULL), I used:&lt;/P&gt;

&lt;PRE&gt;
 | fillnull value="Unknown network error" network_status_title 
 | fillnull value="Network Error" network_status_type 
 | fillnull value="Failure" network_status_ok 
&lt;/PRE&gt;

&lt;P&gt;instead in the query; e.g. when the lookup fails supply default values manually. &lt;/P&gt;

&lt;P&gt;Although the &lt;CODE&gt;WILDCARD&lt;/CODE&gt; should have worked (I probably didn't re-load the dataset) I've since had confirmation from Splunk that using &lt;CODE&gt;fillnull&lt;/CODE&gt; is better from a performance point of view here.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jan 2015 12:00:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-default-match-for-multiple-columns/m-p/191519#M55152</guid>
      <dc:creator>mjpieters</dc:creator>
      <dc:date>2015-01-13T12:00:54Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup default_match for multiple columns?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-default-match-for-multiple-columns/m-p/191520#M55153</link>
      <description>&lt;P&gt;The wildcard requires enabling in &lt;CODE&gt;transforms.conf&lt;/CODE&gt;, e.g.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;match_type = WILDCARD(status)
max_matches = 1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The &lt;CODE&gt;max_matches&lt;/CODE&gt; stops the status matching the wildcard for known values. The lookup csv file can then have an extra entry:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;*,Default title,Default type,Default ok
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 May 2015 17:15:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-default-match-for-multiple-columns/m-p/191520#M55153</guid>
      <dc:creator>madchutney</dc:creator>
      <dc:date>2015-05-26T17:15:25Z</dc:date>
    </item>
  </channel>
</rss>

