<?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 Consolidate data in table using Dedup command in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Consolidate-data-in-table-using-Dedup-command/m-p/579549#M201948</link>
    <description>&lt;P&gt;Hello,&amp;nbsp;&amp;nbsp;&lt;BR /&gt;I am using the below query to output which of our Searches/Rules are mapped to which Mitre Technique IDs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="ruby"&gt;| inputlookup mitre_all_rule_technique_lookup 
| `lookup_technique_tactic_from_rule_name`
| search rule_disabled=0
| dedup rule_name, technique_id, rule_disabled&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Result is as follows:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="151px" height="25px"&gt;rule_name&lt;/TD&gt;&lt;TD width="151px" height="25px"&gt;tactic_ID&lt;/TD&gt;&lt;TD width="151px" height="25px"&gt;tactic_name&lt;/TD&gt;&lt;TD width="131px" height="25px"&gt;Technique_ID&lt;/TD&gt;&lt;TD width="171px" height="25px"&gt;Tecnique_name&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="151px" height="25px"&gt;Rule001&lt;/TD&gt;&lt;TD width="151px" height="25px"&gt;TA001&lt;/TD&gt;&lt;TD width="151px" height="25px"&gt;Persistence&lt;/TD&gt;&lt;TD width="131px" height="25px"&gt;T1136&lt;/TD&gt;&lt;TD width="171px" height="25px"&gt;Create Account&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="151px" height="47px"&gt;Rule001&lt;/TD&gt;&lt;TD width="151px" height="47px"&gt;TA002&lt;/TD&gt;&lt;TD width="151px" height="47px"&gt;Persistence&lt;/TD&gt;&lt;TD width="131px" height="47px"&gt;T1098&lt;/TD&gt;&lt;TD width="171px" height="47px"&gt;Account Manipulation&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="151px" height="25px"&gt;Rule001&lt;/TD&gt;&lt;TD width="151px" height="25px"&gt;TA008&lt;/TD&gt;&lt;TD width="151px" height="25px"&gt;Defense Evasion&lt;/TD&gt;&lt;TD width="131px" height="25px"&gt;Txxxx&lt;/TD&gt;&lt;TD width="171px" height="25px"&gt;Modify infrastructrue&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can see ,&amp;nbsp; it is showing different entries for&amp;nbsp; the same data in the "&lt;STRONG&gt;rule_name&lt;/STRONG&gt;" column .&amp;nbsp; &amp;nbsp;The Rule mentioned in the Rule_name column is mapped to 3 different Tactic_ID ,Technique_IDs etc which is why&amp;nbsp; it shows 3 results for the same rule.&amp;nbsp; How can i consolidate all this ?&lt;BR /&gt;&lt;BR /&gt;Basically this is the output i want :&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE border="1" width="84.30081113624671%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%"&gt;rule_name&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;tactic_ID&lt;/TD&gt;&lt;TD width="17.827956989247312%"&gt;tactic_name&lt;/TD&gt;&lt;TD width="15.505376344086022%"&gt;Technique_ID&lt;/TD&gt;&lt;TD width="31.525698807996402%"&gt;Technique_name&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%"&gt;Rule001&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;TA001&lt;BR /&gt;TA002&lt;BR /&gt;TA008&lt;/TD&gt;&lt;TD width="17.827956989247312%"&gt;Persistence&lt;BR /&gt;Persistence&lt;BR /&gt;Defense Evasion&lt;/TD&gt;&lt;TD width="15.505376344086022%"&gt;T1136&lt;BR /&gt;T1098&lt;BR /&gt;TXXXX&lt;/TD&gt;&lt;TD width="31.525698807996402%"&gt;Create Account&lt;BR /&gt;Account Manipulation&lt;BR /&gt;Modify infrastructure&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%"&gt;Rule002&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;TAxxx&lt;BR /&gt;TAXXX&lt;/TD&gt;&lt;TD width="17.827956989247312%"&gt;....&lt;/TD&gt;&lt;TD width="15.505376344086022%"&gt;.....&lt;/TD&gt;&lt;TD width="31.525698807996402%"&gt;......&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="17.827956989247312%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="15.505376344086022%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="31.525698807996402%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;If i change my dedup command in the query&amp;nbsp; to:&amp;nbsp;&lt;STRONG&gt;&amp;nbsp; | dedup rule_name&amp;nbsp; ,&amp;nbsp; &lt;/STRONG&gt;then it displays only the 1st row&amp;nbsp; of every rule_name and omits the remaining values.&lt;BR /&gt;&lt;BR /&gt;Pls advise. I am sure this is something very fundamental.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 30 Dec 2021 07:43:35 GMT</pubDate>
    <dc:creator>neerajs_81</dc:creator>
    <dc:date>2021-12-30T07:43:35Z</dc:date>
    <item>
      <title>Consolidate data in table using Dedup command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Consolidate-data-in-table-using-Dedup-command/m-p/579549#M201948</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&amp;nbsp;&lt;BR /&gt;I am using the below query to output which of our Searches/Rules are mapped to which Mitre Technique IDs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="ruby"&gt;| inputlookup mitre_all_rule_technique_lookup 
| `lookup_technique_tactic_from_rule_name`
| search rule_disabled=0
| dedup rule_name, technique_id, rule_disabled&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Result is as follows:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="151px" height="25px"&gt;rule_name&lt;/TD&gt;&lt;TD width="151px" height="25px"&gt;tactic_ID&lt;/TD&gt;&lt;TD width="151px" height="25px"&gt;tactic_name&lt;/TD&gt;&lt;TD width="131px" height="25px"&gt;Technique_ID&lt;/TD&gt;&lt;TD width="171px" height="25px"&gt;Tecnique_name&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="151px" height="25px"&gt;Rule001&lt;/TD&gt;&lt;TD width="151px" height="25px"&gt;TA001&lt;/TD&gt;&lt;TD width="151px" height="25px"&gt;Persistence&lt;/TD&gt;&lt;TD width="131px" height="25px"&gt;T1136&lt;/TD&gt;&lt;TD width="171px" height="25px"&gt;Create Account&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="151px" height="47px"&gt;Rule001&lt;/TD&gt;&lt;TD width="151px" height="47px"&gt;TA002&lt;/TD&gt;&lt;TD width="151px" height="47px"&gt;Persistence&lt;/TD&gt;&lt;TD width="131px" height="47px"&gt;T1098&lt;/TD&gt;&lt;TD width="171px" height="47px"&gt;Account Manipulation&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="151px" height="25px"&gt;Rule001&lt;/TD&gt;&lt;TD width="151px" height="25px"&gt;TA008&lt;/TD&gt;&lt;TD width="151px" height="25px"&gt;Defense Evasion&lt;/TD&gt;&lt;TD width="131px" height="25px"&gt;Txxxx&lt;/TD&gt;&lt;TD width="171px" height="25px"&gt;Modify infrastructrue&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can see ,&amp;nbsp; it is showing different entries for&amp;nbsp; the same data in the "&lt;STRONG&gt;rule_name&lt;/STRONG&gt;" column .&amp;nbsp; &amp;nbsp;The Rule mentioned in the Rule_name column is mapped to 3 different Tactic_ID ,Technique_IDs etc which is why&amp;nbsp; it shows 3 results for the same rule.&amp;nbsp; How can i consolidate all this ?&lt;BR /&gt;&lt;BR /&gt;Basically this is the output i want :&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE border="1" width="84.30081113624671%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%"&gt;rule_name&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;tactic_ID&lt;/TD&gt;&lt;TD width="17.827956989247312%"&gt;tactic_name&lt;/TD&gt;&lt;TD width="15.505376344086022%"&gt;Technique_ID&lt;/TD&gt;&lt;TD width="31.525698807996402%"&gt;Technique_name&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%"&gt;Rule001&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;TA001&lt;BR /&gt;TA002&lt;BR /&gt;TA008&lt;/TD&gt;&lt;TD width="17.827956989247312%"&gt;Persistence&lt;BR /&gt;Persistence&lt;BR /&gt;Defense Evasion&lt;/TD&gt;&lt;TD width="15.505376344086022%"&gt;T1136&lt;BR /&gt;T1098&lt;BR /&gt;TXXXX&lt;/TD&gt;&lt;TD width="31.525698807996402%"&gt;Create Account&lt;BR /&gt;Account Manipulation&lt;BR /&gt;Modify infrastructure&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%"&gt;Rule002&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;TAxxx&lt;BR /&gt;TAXXX&lt;/TD&gt;&lt;TD width="17.827956989247312%"&gt;....&lt;/TD&gt;&lt;TD width="15.505376344086022%"&gt;.....&lt;/TD&gt;&lt;TD width="31.525698807996402%"&gt;......&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="17.827956989247312%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="15.505376344086022%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="31.525698807996402%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;If i change my dedup command in the query&amp;nbsp; to:&amp;nbsp;&lt;STRONG&gt;&amp;nbsp; | dedup rule_name&amp;nbsp; ,&amp;nbsp; &lt;/STRONG&gt;then it displays only the 1st row&amp;nbsp; of every rule_name and omits the remaining values.&lt;BR /&gt;&lt;BR /&gt;Pls advise. I am sure this is something very fundamental.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Dec 2021 07:43:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Consolidate-data-in-table-using-Dedup-command/m-p/579549#M201948</guid>
      <dc:creator>neerajs_81</dc:creator>
      <dc:date>2021-12-30T07:43:35Z</dc:date>
    </item>
    <item>
      <title>Re: Consolidate data in table using Dedup command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Consolidate-data-in-table-using-Dedup-command/m-p/579551#M201949</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/229059"&gt;@neerajs_81&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;did you tried to use the stats command?&lt;/P&gt;&lt;P&gt;something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup mitre_all_rule_technique_lookup 
| `lookup_technique_tactic_from_rule_name`
| search rule_disabled=0
| stats 
   values(tactic_ID) AS tactic_ID 
   values(tactic_name) AS tactic_name 
   values(Technique_ID) AS Technique_ID 
   values(Tecnique_name) AS Tecnique_name 
   BY rule_name&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 30 Dec 2021 07:49:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Consolidate-data-in-table-using-Dedup-command/m-p/579551#M201949</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-12-30T07:49:07Z</dc:date>
    </item>
    <item>
      <title>Re: Consolidate data in table using Dedup command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Consolidate-data-in-table-using-Dedup-command/m-p/579552#M201950</link>
      <description>&lt;P&gt;Thank you very much.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Dec 2021 07:52:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Consolidate-data-in-table-using-Dedup-command/m-p/579552#M201950</guid>
      <dc:creator>neerajs_81</dc:creator>
      <dc:date>2021-12-30T07:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: Consolidate data in table using Dedup command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Consolidate-data-in-table-using-Dedup-command/m-p/579553#M201951</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/229059"&gt;@neerajs_81&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;good for you, see next time.&lt;/P&gt;&lt;P&gt;Ciao and happy splunking.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Dec 2021 07:56:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Consolidate-data-in-table-using-Dedup-command/m-p/579553#M201951</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-12-30T07:56:10Z</dc:date>
    </item>
  </channel>
</rss>

