<?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: How do I remove rows from a table based on empty column values? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-remove-rows-from-a-table-based-on-empty-column-values/m-p/230972#M68510</link>
    <description>&lt;P&gt;Writing &lt;CODE&gt;| where match(Comment1,".")&lt;/CODE&gt; nets me 0 results. I would assume it would return me the row in the picture where Comment1 is populated.&lt;/P&gt;

&lt;P&gt;My goal is of course having all the rows where any of the Comments are populated.&lt;/P&gt;</description>
    <pubDate>Fri, 18 Sep 2015 15:49:30 GMT</pubDate>
    <dc:creator>mrg_linus</dc:creator>
    <dc:date>2015-09-18T15:49:30Z</dc:date>
    <item>
      <title>How do I remove rows from a table based on empty column values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-remove-rows-from-a-table-based-on-empty-column-values/m-p/230970#M68508</link>
      <description>&lt;P&gt;&lt;STRONG&gt;What I'm trying to do&lt;/STRONG&gt;&lt;BR /&gt;
Using the export API &lt;CODE&gt;/servicesNS/admin/search/search/jobs/export?output_mode=json&amp;amp;search=search&lt;/CODE&gt; I want to fetch (into a new cool system) comments made from CustomerServiceAgents in another system that then have been imported in Splunk. There are a lot of comments and I see that I can reduce the amount of retrieved rows by eliminating the ones where all the Comment fields are empty.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;My question&lt;/STRONG&gt;&lt;BR /&gt;
How do I go about removing the rows where all Comments are empty? I've fiddled about with &lt;STRONG&gt;where&lt;/STRONG&gt; and setting the field =*, but Splunk just sees this as invalid. See attached image to view my query and the result.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2015 14:10:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-remove-rows-from-a-table-based-on-empty-column-values/m-p/230970#M68508</guid>
      <dc:creator>mrg_linus</dc:creator>
      <dc:date>2015-09-18T14:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: How do I remove rows from a table based on empty column values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-remove-rows-from-a-table-based-on-empty-column-values/m-p/230971#M68509</link>
      <description>&lt;P&gt;Yeah, where doesn't like wildcards, but you can use it with match function.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;.... | where match(comment_field,".")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 18 Sep 2015 15:20:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-remove-rows-from-a-table-based-on-empty-column-values/m-p/230971#M68509</guid>
      <dc:creator>maciep</dc:creator>
      <dc:date>2015-09-18T15:20:25Z</dc:date>
    </item>
    <item>
      <title>Re: How do I remove rows from a table based on empty column values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-remove-rows-from-a-table-based-on-empty-column-values/m-p/230972#M68510</link>
      <description>&lt;P&gt;Writing &lt;CODE&gt;| where match(Comment1,".")&lt;/CODE&gt; nets me 0 results. I would assume it would return me the row in the picture where Comment1 is populated.&lt;/P&gt;

&lt;P&gt;My goal is of course having all the rows where any of the Comments are populated.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2015 15:49:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-remove-rows-from-a-table-based-on-empty-column-values/m-p/230972#M68510</guid>
      <dc:creator>mrg_linus</dc:creator>
      <dc:date>2015-09-18T15:49:30Z</dc:date>
    </item>
    <item>
      <title>Re: How do I remove rows from a table based on empty column values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-remove-rows-from-a-table-based-on-empty-column-values/m-p/230973#M68511</link>
      <description>&lt;P&gt;Based on your data from the screenshot, try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search  Value=* | eval {Property}=Value | stats lastest(*) as * by AccountID
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 18 Sep 2015 16:01:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-remove-rows-from-a-table-based-on-empty-column-values/m-p/230973#M68511</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2015-09-18T16:01:35Z</dc:date>
    </item>
    <item>
      <title>Re: How do I remove rows from a table based on empty column values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-remove-rows-from-a-table-based-on-empty-column-values/m-p/230974#M68512</link>
      <description>&lt;P&gt;it depends on where you have the where.  If it's after the stats, then you don't have a field called Comment1, you have a field called "latest(Comment1)".  &lt;/P&gt;

&lt;P&gt;So maybe try putting it before the stats.  Or try what  somesoni2 mentioned to keep the original field names.  &lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2015 16:16:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-remove-rows-from-a-table-based-on-empty-column-values/m-p/230974#M68512</guid>
      <dc:creator>maciep</dc:creator>
      <dc:date>2015-09-18T16:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: How do I remove rows from a table based on empty column values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-remove-rows-from-a-table-based-on-empty-column-values/m-p/230975#M68513</link>
      <description>&lt;P&gt;Right perfect :)!&lt;/P&gt;

&lt;P&gt;You are correct, I needed &lt;CODE&gt;| where match("latest(Comment1)",".")&lt;/CODE&gt; if I didn't rename the columns. Thanks to @somesoni2!&lt;/P&gt;

&lt;P&gt;Ended up with&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="*_db_customer" sourcetype="*:db:account:property" | eval {Property} = Value | stats latest(Comment*) by AccountID | table AccountID, latest(Comment*) | rename latest(*) to * | where match(Comment1,".") OR match(Comment2,".") OR match(Comment3,".") OR match(Comment4,".") OR match(Comment5,".") OR match(Comment6,".") OR match(Comment7,".") OR match(Comment8,".") OR match(Comment9,".") OR match(Comment10,".")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 21 Sep 2015 12:42:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-remove-rows-from-a-table-based-on-empty-column-values/m-p/230975#M68513</guid>
      <dc:creator>mrg_linus</dc:creator>
      <dc:date>2015-09-21T12:42:16Z</dc:date>
    </item>
  </channel>
</rss>

