<?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: drop null value in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/drop-null-value/m-p/492270#M137319</link>
    <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/8532iECF929D2E2DBF36D/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 16 Mar 2020 18:54:41 GMT</pubDate>
    <dc:creator>riqbal47010</dc:creator>
    <dc:date>2020-03-16T18:54:41Z</dc:date>
    <item>
      <title>drop null value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/drop-null-value/m-p/492267#M137316</link>
      <description>&lt;P&gt;I have below query&lt;BR /&gt;
    index=f5 partition="/Common/&lt;EM&gt;-&lt;/EM&gt;"   | rex "Username\s+'(?&lt;USERNAME&gt;(.*))'" | eval Username=coalesce(Username, user)&lt;/USERNAME&gt;&lt;/P&gt;

&lt;P&gt;username is there but first attempt he left empty and in second try he add his username. so the Username is showing null values whereas the default user field is showing actual username.&lt;/P&gt;

&lt;P&gt;I am using coalesce because I want to take either value but it should not be null. How can I achieve this.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2020 13:39:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/drop-null-value/m-p/492267#M137316</guid>
      <dc:creator>riqbal47010</dc:creator>
      <dc:date>2020-03-16T13:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: drop null value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/drop-null-value/m-p/492268#M137317</link>
      <description>&lt;P&gt;Can you provide a sample event?&lt;BR /&gt;
It sounds like your regular expression might not be working exactly as you expect.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2020 15:19:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/drop-null-value/m-p/492268#M137317</guid>
      <dc:creator>rmmiller</dc:creator>
      <dc:date>2020-03-16T15:19:56Z</dc:date>
    </item>
    <item>
      <title>Re: drop null value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/drop-null-value/m-p/492269#M137318</link>
      <description>&lt;P&gt;attaching for your kind consideration&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2020 18:54:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/drop-null-value/m-p/492269#M137318</guid>
      <dc:creator>riqbal47010</dc:creator>
      <dc:date>2020-03-16T18:54:30Z</dc:date>
    </item>
    <item>
      <title>Re: drop null value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/drop-null-value/m-p/492270#M137319</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/8532iECF929D2E2DBF36D/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2020 18:54:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/drop-null-value/m-p/492270#M137319</guid>
      <dc:creator>riqbal47010</dc:creator>
      <dc:date>2020-03-16T18:54:41Z</dc:date>
    </item>
    <item>
      <title>Re: drop null value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/drop-null-value/m-p/492271#M137320</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/8533iCBFBABE2CC7D247A/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2020 18:54:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/drop-null-value/m-p/492271#M137320</guid>
      <dc:creator>riqbal47010</dc:creator>
      <dc:date>2020-03-16T18:54:41Z</dc:date>
    </item>
    <item>
      <title>Re: drop null value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/drop-null-value/m-p/492272#M137321</link>
      <description>&lt;P&gt;Function coalesce assigns the value of &lt;STRONG&gt;user&lt;/STRONG&gt; field only if &lt;STRONG&gt;Username&lt;/STRONG&gt; field does not exist in that event. But here it is set as empty string (""). Use if instead. below will sets value &lt;STRONG&gt;to user&lt;/STRONG&gt; &lt;STRONG&gt;if&lt;/STRONG&gt; Username is blank &lt;STRONG&gt;else&lt;/STRONG&gt; sets to Username.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=f5 partition="/Common/-" | rex "Username\s+'(?&amp;lt;Username&amp;gt;.*)'"| eval Username=if(Username == "",  user, Username)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Mar 2020 20:12:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/drop-null-value/m-p/492272#M137321</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2020-03-16T20:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: drop null value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/drop-null-value/m-p/492273#M137322</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index=f5 partition="/Common/-" 
| rex "Username\s+'(?&amp;lt;Username&amp;gt;\w+)'" 
| eval Username=coalesce(Username, user)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;your REGEX &lt;CODE&gt;.*&lt;/CODE&gt; match null value. &lt;BR /&gt;
How about this? &lt;BR /&gt;
If &lt;EM&gt;Username&lt;/EM&gt; has &lt;CODE&gt;-&lt;/CODE&gt;,  REGEX is &lt;CODE&gt;[\w\-]+&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2020 21:29:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/drop-null-value/m-p/492273#M137322</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-03-16T21:29:56Z</dc:date>
    </item>
  </channel>
</rss>

