<?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: Remove duplicates in multiple columns (Column format - abc_000001 ) and sorting in same order with wild card? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Remove-duplicates-in-multiple-columns-Column-format-abc-000001/m-p/261944#M78651</link>
    <description>&lt;P&gt;How about this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;base search | extract pairdelim=" " kvdelim="=" | table abc_* | untable _hidden _current_field new_field | dedup new_field
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 31 Aug 2016 01:58:12 GMT</pubDate>
    <dc:creator>sundareshr</dc:creator>
    <dc:date>2016-08-31T01:58:12Z</dc:date>
    <item>
      <title>Remove duplicates in multiple columns (Column format - abc_000001 ) and sorting in same order with wild card?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Remove-duplicates-in-multiple-columns-Column-format-abc-000001/m-p/261943#M78650</link>
      <description>&lt;P&gt;Hi, I need some help to transform the below event? Thanks for your time.&lt;/P&gt;

&lt;P&gt;2016-08-30 13:13:48,525 log_level='INFO' abc_000001="temp" abc_000002="temp1" abc_000003="temp2" abc_000004="temp2" abc_000005="temp2" abc_000006="temp3" ....... abc_000255="123" abc_000256="xyz"&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| table abc_*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;doesn't display all the fields and the order is missing. There are almost 300 fields. How to table all the field values using wild card?&lt;/P&gt;

&lt;P&gt;How to create a new field  - NEW_FIELD with the unique values of abc_* in the same order. &lt;/P&gt;

&lt;P&gt;Expected Output :&lt;/P&gt;

&lt;P&gt;NEW_FIELD&lt;/P&gt;

&lt;P&gt;temp&lt;BR /&gt;
temp1&lt;BR /&gt;
temp2 (abc_000003,abc_000004 has the same value. So need to remove duplicates)&lt;BR /&gt;
temp3&lt;BR /&gt;
123&lt;BR /&gt;
xyz&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:51:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Remove-duplicates-in-multiple-columns-Column-format-abc-000001/m-p/261943#M78650</guid>
      <dc:creator>Kukkadapu</dc:creator>
      <dc:date>2020-09-29T10:51:27Z</dc:date>
    </item>
    <item>
      <title>Re: Remove duplicates in multiple columns (Column format - abc_000001 ) and sorting in same order with wild card?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Remove-duplicates-in-multiple-columns-Column-format-abc-000001/m-p/261944#M78651</link>
      <description>&lt;P&gt;How about this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;base search | extract pairdelim=" " kvdelim="=" | table abc_* | untable _hidden _current_field new_field | dedup new_field
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 31 Aug 2016 01:58:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Remove-duplicates-in-multiple-columns-Column-format-abc-000001/m-p/261944#M78651</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-08-31T01:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: Remove duplicates in multiple columns (Column format - abc_000001 ) and sorting in same order with wild card?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Remove-duplicates-in-multiple-columns-Column-format-abc-000001/m-p/261945#M78652</link>
      <description>&lt;P&gt;Wow !! This works perfect &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; If you don't mind, can you explain the query?&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2016 17:23:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Remove-duplicates-in-multiple-columns-Column-format-abc-000001/m-p/261945#M78652</guid>
      <dc:creator>Kukkadapu</dc:creator>
      <dc:date>2016-08-31T17:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: Remove duplicates in multiple columns (Column format - abc_000001 ) and sorting in same order with wild card?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Remove-duplicates-in-multiple-columns-Column-format-abc-000001/m-p/261946#M78653</link>
      <description>&lt;P&gt;I think you first problem was that the fields were not extracted properly, hence &lt;CODE&gt;| table abc_*&lt;/CODE&gt; did not produce any results.  The &lt;CODE&gt;extract&lt;/CODE&gt; does just that. It extract kv pairs from _raw events.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/6.4.2/SearchReference/Extract"&gt;https://docs.splunk.com/Documentation/Splunk/6.4.2/SearchReference/Extract&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;The &lt;CODE&gt;untable&lt;/CODE&gt; command converts results from a tabular format to a format similar to stats output. I added a &lt;EM&gt;hidden field that, which has no values. But, but default all fields that begin with `&lt;/EM&gt;&lt;CODE&gt;are hidden by default. So naming a field starting with&lt;/CODE&gt;_&lt;CODE&gt;is the same as adding&lt;/CODE&gt;| fields - hidden`&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/6.4.3/SearchReference/Untable"&gt;https://docs.splunk.com/Documentation/Splunk/6.4.3/SearchReference/Untable&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Hope this helps. Feel free to ask questions if this doesn't clarify.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2016 17:35:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Remove-duplicates-in-multiple-columns-Column-format-abc-000001/m-p/261946#M78653</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-08-31T17:35:28Z</dc:date>
    </item>
    <item>
      <title>Re: Remove duplicates in multiple columns (Column format - abc_000001 ) and sorting in same order with wild card?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Remove-duplicates-in-multiple-columns-Column-format-abc-000001/m-p/261947#M78654</link>
      <description>&lt;P&gt;That makes sense. Thanks for your time sundareshr .&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2016 18:33:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Remove-duplicates-in-multiple-columns-Column-format-abc-000001/m-p/261947#M78654</guid>
      <dc:creator>Kukkadapu</dc:creator>
      <dc:date>2016-08-31T18:33:03Z</dc:date>
    </item>
  </channel>
</rss>

