<?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: Duplication of row in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/Duplication-of-row/m-p/533022#M4445</link>
    <description>&lt;P&gt;Please help me&lt;/P&gt;</description>
    <pubDate>Mon, 14 Dec 2020 16:32:35 GMT</pubDate>
    <dc:creator>sweety1309</dc:creator>
    <dc:date>2020-12-14T16:32:35Z</dc:date>
    <item>
      <title>Duplication of row</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Duplication-of-row/m-p/533018#M4443</link>
      <description>&lt;P&gt;Hello everyone,I have this query-&lt;/P&gt;&lt;P&gt;index="dpsnapitt" AND (class= "GRADE 12 B" OR class= "GRADE 12 B *") AND (day="DAY 4" OR NOT day=*)&lt;BR /&gt;| rename "start time" as start, "end time" as end&lt;BR /&gt;| rename class as Class&lt;BR /&gt;| rename email as organizer_email&lt;BR /&gt;| dedup subject, Class, organizer_email, start&lt;BR /&gt;| join type=outer organizer_email&lt;BR /&gt;[search index="dpsn_teachers" earliest=0 latest= now&lt;BR /&gt;| rename name.fullName as teacher&lt;BR /&gt;| rename primaryEmail as organizer_email]&lt;BR /&gt;|join type=outer organizer_email max=0&lt;BR /&gt;[search index="dpsn_meet" | where email== organizer_email]&lt;BR /&gt;| rex field=date "(?&amp;lt;yy&amp;gt;[^\.]*)\-(?&amp;lt;mm&amp;gt;[^\.]*)\-(?&amp;lt;dd&amp;gt;[\S]*)T(?&amp;lt;hh&amp;gt;[^\.]*)\:(?&amp;lt;min&amp;gt;[^\.]*)\:(?&amp;lt;sec&amp;gt;[^\.]*)\."&lt;BR /&gt;| eval ndatetime = yy.mm.dd.hh.min.sec&lt;BR /&gt;| eval _time=strptime(ndatetime,"%Y%m%d%H%M%S") + 19800&lt;BR /&gt;| eval Time=strftime(_time, "%H:%M")&lt;BR /&gt;| eval p = strptime(start,"%H:%M")-1020|eval q = strftime(p,"%H:%M")&lt;BR /&gt;| eval r = strptime(end,"%H:%M") |eval s = strftime(r,"%H:%M")&lt;BR /&gt;| eval meet_start_time = strftime((strptime(Time,"%H:%M")-duration_seconds), "%H:%M")&lt;BR /&gt;| eval z = if((meet_start_time &amp;gt;= q AND meet_start_time &amp;lt;= s), 1, 0)&lt;BR /&gt;| eval meeting_code = case( z == 1, meeting_code, z==0, "N/A")&lt;BR /&gt;| dedup organizer_email, meeting_code, start, end&lt;BR /&gt;| table Class, teacher, organizer_email, subject, "start", "end", meeting_code&lt;BR /&gt;| sort - period - day | reverse&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I run this query on 4 Dec 2020,it is producing following result-see image.&lt;/P&gt;&lt;P&gt;Those rows where meeting code is present is getting duplicated with meeting_code "N/A".I dont want that duplicated row.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help..I would be very thankful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 16:52:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Duplication-of-row/m-p/533018#M4443</guid>
      <dc:creator>sweety1309</dc:creator>
      <dc:date>2020-12-14T16:52:41Z</dc:date>
    </item>
    <item>
      <title>Re: Duplication of row</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Duplication-of-row/m-p/533021#M4444</link>
      <description>&lt;P&gt;This is probably because the last join returns more than 1 result for each meeting (presumably multiple events during the meeting) Hence you always have a meeting that falls both Inside and outside of your meeting_code case condition, resulting in two statuses.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you use a |stats latest(end) to only bring in the last result of "end"?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;...[search index="dpsn_meet" | stats latest(end) as end latest(start) as start latest(date) as date by email| where email== organizer_email]|...&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 14 Dec 2020 16:26:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Duplication-of-row/m-p/533021#M4444</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2020-12-14T16:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: Duplication of row</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Duplication-of-row/m-p/533022#M4445</link>
      <description>&lt;P&gt;Please help me&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 16:32:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Duplication-of-row/m-p/533022#M4445</guid>
      <dc:creator>sweety1309</dc:creator>
      <dc:date>2020-12-14T16:32:35Z</dc:date>
    </item>
    <item>
      <title>Re: Duplication of row</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Duplication-of-row/m-p/533023#M4446</link>
      <description>&lt;P&gt;But now I am not getting the meeting_code which I was getting earlier in this case.U can have a look at the image.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 16:52:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Duplication-of-row/m-p/533023#M4446</guid>
      <dc:creator>sweety1309</dc:creator>
      <dc:date>2020-12-14T16:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: Duplication of row</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Duplication-of-row/m-p/533025#M4447</link>
      <description>&lt;P&gt;The problem is here:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval z = if((meet_start_time &amp;gt;= q AND meet_start_time &amp;lt;= s), 1, 0)
| eval meeting_code = case( z == 1, meeting_code, z==0, "N/A")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For any meeting which has multiple events that match both values of Z, you will get duplicates.&lt;/P&gt;&lt;P&gt;You could change the last dedup command to:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| dedup organizer_email, start, end&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Which may solve your problem in most cases*, but you might be better off using a stats latest command to only bring in a single value to the join as per my suggestion above.&lt;/P&gt;&lt;P&gt;* I would expect that meetings in progress would show N/A,&amp;nbsp; meetings that have completed to show the meeting code&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 16:44:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Duplication-of-row/m-p/533025#M4447</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2020-12-14T16:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: Duplication of row</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Duplication-of-row/m-p/533027#M4448</link>
      <description>&lt;P&gt;But meeting_code is all I need here.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 16:50:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Duplication-of-row/m-p/533027#M4448</guid>
      <dc:creator>sweety1309</dc:creator>
      <dc:date>2020-12-14T16:50:07Z</dc:date>
    </item>
    <item>
      <title>Re: Duplication of row</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Duplication-of-row/m-p/533341#M4486</link>
      <description>&lt;P&gt;Can u help me with any alternate options ..I need the meeting_code..Please help me with this.I am stuck here&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2020 15:35:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Duplication-of-row/m-p/533341#M4486</guid>
      <dc:creator>sweety1309</dc:creator>
      <dc:date>2020-12-16T15:35:27Z</dc:date>
    </item>
  </channel>
</rss>

