<?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 Dedup is removing the duplicate fields which is having the Unique value in other column in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Dedup-is-removing-the-duplicate-fields-which-is-having-the/m-p/631459#M219323</link>
    <description>&lt;P&gt;Hello Splunkers,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I have used a query in the search for mitre fields extraction and after the extraction i have got the results with the query name and the technique_id. But here the problem comes. Each query is having the technique_id and the sub technique_id, so i have matched the sub technique_id with the technique_id and the results is shown with the same rule name two times with the technique_id. So i want to remove&amp;nbsp; the duplicate rule name, if so i used the dedup then the rule having the other technique_id is also getting removed. I have attached the screenshot for reference...&lt;/P&gt;&lt;P&gt;The query i used for getting the results is&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;BR /&gt;&lt;BR /&gt;| rest /services/configs/conf-analyticstories &lt;BR /&gt;| where annotations!="" &lt;BR /&gt;| spath input=annotations path=mitre_attack{} output=mitre_attack &lt;BR /&gt;| eval rule_name=ltrim(title,"savedsearch://") &lt;BR /&gt;| fields rule_name,mitre_attack &lt;BR /&gt;| join rule_name &lt;BR /&gt;[| rest /services/configs/conf-analyticstories &lt;BR /&gt;| where searches!="" &lt;BR /&gt;| eval rule_name=searches &lt;BR /&gt;| table title,rule_name &lt;BR /&gt;| eval rule_name=trim(rule_name,"[") &lt;BR /&gt;| eval rule_name=trim(rule_name,"]") &lt;BR /&gt;| eval rule_name=split(rule_name,",") &lt;BR /&gt;| mvexpand rule_name &lt;BR /&gt;| eval rule_name=trim(rule_name," ") &lt;BR /&gt;| eval rule_name=trim(rule_name,"\"")&lt;BR /&gt;] &lt;BR /&gt;| append &lt;BR /&gt;[| rest services/configs/conf-savedsearches &lt;BR /&gt;| eval rule_name=title &lt;BR /&gt;| search action.correlationsearch.annotations="*" &lt;BR /&gt;| spath input=action.correlationsearch.annotations path=mitre_attack{} output=mitre_attack &lt;BR /&gt;| fields rule_name, mitre_attack] &lt;BR /&gt;| eval technique_name = if(match(mitre_attack,"^T\d\d\d"),null(), mitre_attack)&lt;BR /&gt;| lookup mitre_tt_lookup technique_name OUTPUT technique_id as tmp_id0&lt;BR /&gt;| eval tmp_id1 = if(match(mitre_attack,"^T\d\d\d"), mitre_attack, null())&lt;BR /&gt;| eval technique_id=coalesce(tmp_id0, tmp_id1)&lt;BR /&gt;| where NOT isnull(technique_id) &lt;BR /&gt;| table rule_name, technique_id &lt;BR /&gt;| inputlookup mitre_user_rule_technique_lookup append=true &lt;BR /&gt;| inputlookup mitre_app_rule_technique_lookup append=true &lt;BR /&gt;| makemv tokenizer="([^\n\s]+)" technique_id &lt;BR /&gt;| mvexpand technique_id &lt;BR /&gt;| dedup rule_name,technique_id &lt;BR /&gt;| join rule_name &lt;BR /&gt;[| rest services/configs/conf-savedsearches &lt;BR /&gt;| eval rule_name=title &lt;BR /&gt;| eval stage= if(disabled == 1, "Disabled", "Enabled")&lt;BR /&gt;| table rule_name, stage&lt;BR /&gt;] &lt;BR /&gt;| eval subtechnique_id=if(match(technique_id,"\."),technique_id,null())&lt;BR /&gt;| eval technique_id=if(match(technique_id,"\."),replace(technique_id,"\.\d+",""),technique_id)&lt;BR /&gt;|search stage=Enabled&lt;BR /&gt;|table rule_name,technique_id&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LRathinakumar_0-1676800735000.png" style="width: 3236px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/23947i44002CBEF665064B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LRathinakumar_0-1676800735000.png" alt="LRathinakumar_0-1676800735000.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance....&lt;/P&gt;</description>
    <pubDate>Sun, 19 Feb 2023 10:01:53 GMT</pubDate>
    <dc:creator>LRathinakumar</dc:creator>
    <dc:date>2023-02-19T10:01:53Z</dc:date>
    <item>
      <title>Dedup is removing the duplicate fields which is having the Unique value in other column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dedup-is-removing-the-duplicate-fields-which-is-having-the/m-p/631459#M219323</link>
      <description>&lt;P&gt;Hello Splunkers,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I have used a query in the search for mitre fields extraction and after the extraction i have got the results with the query name and the technique_id. But here the problem comes. Each query is having the technique_id and the sub technique_id, so i have matched the sub technique_id with the technique_id and the results is shown with the same rule name two times with the technique_id. So i want to remove&amp;nbsp; the duplicate rule name, if so i used the dedup then the rule having the other technique_id is also getting removed. I have attached the screenshot for reference...&lt;/P&gt;&lt;P&gt;The query i used for getting the results is&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;BR /&gt;&lt;BR /&gt;| rest /services/configs/conf-analyticstories &lt;BR /&gt;| where annotations!="" &lt;BR /&gt;| spath input=annotations path=mitre_attack{} output=mitre_attack &lt;BR /&gt;| eval rule_name=ltrim(title,"savedsearch://") &lt;BR /&gt;| fields rule_name,mitre_attack &lt;BR /&gt;| join rule_name &lt;BR /&gt;[| rest /services/configs/conf-analyticstories &lt;BR /&gt;| where searches!="" &lt;BR /&gt;| eval rule_name=searches &lt;BR /&gt;| table title,rule_name &lt;BR /&gt;| eval rule_name=trim(rule_name,"[") &lt;BR /&gt;| eval rule_name=trim(rule_name,"]") &lt;BR /&gt;| eval rule_name=split(rule_name,",") &lt;BR /&gt;| mvexpand rule_name &lt;BR /&gt;| eval rule_name=trim(rule_name," ") &lt;BR /&gt;| eval rule_name=trim(rule_name,"\"")&lt;BR /&gt;] &lt;BR /&gt;| append &lt;BR /&gt;[| rest services/configs/conf-savedsearches &lt;BR /&gt;| eval rule_name=title &lt;BR /&gt;| search action.correlationsearch.annotations="*" &lt;BR /&gt;| spath input=action.correlationsearch.annotations path=mitre_attack{} output=mitre_attack &lt;BR /&gt;| fields rule_name, mitre_attack] &lt;BR /&gt;| eval technique_name = if(match(mitre_attack,"^T\d\d\d"),null(), mitre_attack)&lt;BR /&gt;| lookup mitre_tt_lookup technique_name OUTPUT technique_id as tmp_id0&lt;BR /&gt;| eval tmp_id1 = if(match(mitre_attack,"^T\d\d\d"), mitre_attack, null())&lt;BR /&gt;| eval technique_id=coalesce(tmp_id0, tmp_id1)&lt;BR /&gt;| where NOT isnull(technique_id) &lt;BR /&gt;| table rule_name, technique_id &lt;BR /&gt;| inputlookup mitre_user_rule_technique_lookup append=true &lt;BR /&gt;| inputlookup mitre_app_rule_technique_lookup append=true &lt;BR /&gt;| makemv tokenizer="([^\n\s]+)" technique_id &lt;BR /&gt;| mvexpand technique_id &lt;BR /&gt;| dedup rule_name,technique_id &lt;BR /&gt;| join rule_name &lt;BR /&gt;[| rest services/configs/conf-savedsearches &lt;BR /&gt;| eval rule_name=title &lt;BR /&gt;| eval stage= if(disabled == 1, "Disabled", "Enabled")&lt;BR /&gt;| table rule_name, stage&lt;BR /&gt;] &lt;BR /&gt;| eval subtechnique_id=if(match(technique_id,"\."),technique_id,null())&lt;BR /&gt;| eval technique_id=if(match(technique_id,"\."),replace(technique_id,"\.\d+",""),technique_id)&lt;BR /&gt;|search stage=Enabled&lt;BR /&gt;|table rule_name,technique_id&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LRathinakumar_0-1676800735000.png" style="width: 3236px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/23947i44002CBEF665064B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LRathinakumar_0-1676800735000.png" alt="LRathinakumar_0-1676800735000.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance....&lt;/P&gt;</description>
      <pubDate>Sun, 19 Feb 2023 10:01:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dedup-is-removing-the-duplicate-fields-which-is-having-the/m-p/631459#M219323</guid>
      <dc:creator>LRathinakumar</dc:creator>
      <dc:date>2023-02-19T10:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: Dedup is removing the duplicate fields which is having the Unique value in other column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dedup-is-removing-the-duplicate-fields-which-is-having-the/m-p/631460#M219324</link>
      <description>&lt;P&gt;Repeat the dedup line at the end&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| dedup rule_name,technique_id &lt;/LI-CODE&gt;&lt;P&gt;Or don't edit the technique_id after the dedup to see the different versions&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval technique_id=if(match(technique_id,"\."),replace(technique_id,"\.\d+",""),technique_id)&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 19 Feb 2023 10:37:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dedup-is-removing-the-duplicate-fields-which-is-having-the/m-p/631460#M219324</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-02-19T10:37:35Z</dc:date>
    </item>
  </channel>
</rss>

