<?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 you get join functionality without using subsearch? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-join-functionality-without-using-subsearch/m-p/415229#M119550</link>
    <description>&lt;P&gt;This did not work. It seems like the where and dedup function both are not working&lt;/P&gt;</description>
    <pubDate>Thu, 11 Oct 2018 19:23:52 GMT</pubDate>
    <dc:creator>djain</dc:creator>
    <dc:date>2018-10-11T19:23:52Z</dc:date>
    <item>
      <title>How do you get join functionality without using subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-join-functionality-without-using-subsearch/m-p/415223#M119544</link>
      <description>&lt;P&gt;Hey Splunkers,&lt;/P&gt;

&lt;P&gt;Here is my original query where the sub search is getting truncated to 50000 records.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index = abc sourcetype=abc_errors 
| rename  device.headwaters.watermark.core.DeviceInfo.receiverId.string AS receiverId
| fields receiverId 
| join receiverId[search index=abc sourcetype=abc_temp|fields receiverId billingId]
| table receiverId billingId
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I am trying to write a &lt;CODE&gt;stats&lt;/CODE&gt; command for it so that I don't have to use &lt;CODE&gt;join&lt;/CODE&gt;. Here is what I thought might work but doesn't.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index = abc (sourcetype=abc_errors OR sourcetype=abc_temp)
  | fields sourcetype receiverId billingId device.headwaters.watermark.core.DeviceInfo.receiverId.string
  | rename device.headwaters.watermark.core.DeviceInfo.receiverId.string AS receiverId 
  | dedup receiverId sourcetype
  | stats count AS total by receiverId
  | where total&amp;gt;1
  | table receiverId
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Can someone tell me what I might be doing wrong? I know there is something funky about the &lt;CODE&gt;dedup&lt;/CODE&gt;, but I can't think of anything else right now.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Divyank&lt;/P&gt;</description>
      <pubDate>Thu, 11 Oct 2018 18:23:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-join-functionality-without-using-subsearch/m-p/415223#M119544</guid>
      <dc:creator>djain</dc:creator>
      <dc:date>2018-10-11T18:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: How do you get join functionality without using subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-join-functionality-without-using-subsearch/m-p/415224#M119545</link>
      <description>&lt;P&gt;Please try like below&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=abc sourcetype=abc_temp [index = abc sourcetype=abc_errors  | rename device.headwaters.watermark.core.DeviceInfo.receiverId.string AS receiverId | stats count by receiverId| fields receiverId]
|fields receiverId billingId
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 11 Oct 2018 18:29:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-join-functionality-without-using-subsearch/m-p/415224#M119545</guid>
      <dc:creator>koshyk</dc:creator>
      <dc:date>2018-10-11T18:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: How do you get join functionality without using subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-join-functionality-without-using-subsearch/m-p/415225#M119546</link>
      <description>&lt;P&gt;try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index = abc (sourcetype=abc_errors OR sourcetype=abc_temp)
| fields sourcetype receiverId billingId device.headwaters.watermark.core.DeviceInfo.receiverId.string 
| eval receiver_id = coalesce(receiverId, device.headwaters.watermark.core.DeviceInfo.receiverId.string)
| stats count as total by reciver_id
| where total&amp;gt;1 
| table receiver_id
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;hope it helps&lt;/P&gt;</description>
      <pubDate>Thu, 11 Oct 2018 18:35:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-join-functionality-without-using-subsearch/m-p/415225#M119546</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2018-10-11T18:35:56Z</dc:date>
    </item>
    <item>
      <title>Re: How do you get join functionality without using subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-join-functionality-without-using-subsearch/m-p/415226#M119547</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index=abc (sourcetype=abc_temp OR sourcetype=abc_errors)| fields sourcetype receiverId billingId device.headwaters.watermark.core.DeviceInfo.receiverId.string | rename device.headwaters.watermark.core.DeviceInfo.receiverId.string AS receiverId | dedup sourcetype receiverId|stats count(eval(sourcetype="abc_temp")) as temp, count(eval(sourcetype="abc_errors")) as errors by receiverId| where temp=errors
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 11 Oct 2018 18:57:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-join-functionality-without-using-subsearch/m-p/415226#M119547</guid>
      <dc:creator>Vijeta</dc:creator>
      <dc:date>2018-10-11T18:57:26Z</dc:date>
    </item>
    <item>
      <title>Re: How do you get join functionality without using subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-join-functionality-without-using-subsearch/m-p/415227#M119548</link>
      <description>&lt;P&gt;This did not work It wouldn't give any results. Also we are not comparing the receiverId from both sourcetype?  So for example if one sourcetype has more than one value for that receiverId it would still show up in the results? We want only the common receiverId between the sourcetypes to show&lt;/P&gt;</description>
      <pubDate>Thu, 11 Oct 2018 19:22:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-join-functionality-without-using-subsearch/m-p/415227#M119548</guid>
      <dc:creator>djain</dc:creator>
      <dc:date>2018-10-11T19:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: How do you get join functionality without using subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-join-functionality-without-using-subsearch/m-p/415228#M119549</link>
      <description>&lt;P&gt;This approach is using a subsearch? That is the problem that we are facing, subsearch is limited to 50000 rows&lt;/P&gt;</description>
      <pubDate>Thu, 11 Oct 2018 19:22:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-join-functionality-without-using-subsearch/m-p/415228#M119549</guid>
      <dc:creator>djain</dc:creator>
      <dc:date>2018-10-11T19:22:53Z</dc:date>
    </item>
    <item>
      <title>Re: How do you get join functionality without using subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-join-functionality-without-using-subsearch/m-p/415229#M119550</link>
      <description>&lt;P&gt;This did not work. It seems like the where and dedup function both are not working&lt;/P&gt;</description>
      <pubDate>Thu, 11 Oct 2018 19:23:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-join-functionality-without-using-subsearch/m-p/415229#M119550</guid>
      <dc:creator>djain</dc:creator>
      <dc:date>2018-10-11T19:23:52Z</dc:date>
    </item>
    <item>
      <title>Re: How do you get join functionality without using subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-join-functionality-without-using-subsearch/m-p/415230#M119551</link>
      <description>&lt;P&gt;@DalJeanis I am sorry for the direct tag, but you answered one of these questions for me perfectly so wanted to se if you can help me again&lt;/P&gt;</description>
      <pubDate>Thu, 11 Oct 2018 19:26:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-join-functionality-without-using-subsearch/m-p/415230#M119551</guid>
      <dc:creator>djain</dc:creator>
      <dc:date>2018-10-11T19:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: How do you get join functionality without using subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-join-functionality-without-using-subsearch/m-p/415231#M119552</link>
      <description>&lt;P&gt;Try doing a sort on sourcetype receiverId before dedup.  What is the output you are getting using above search, you can test it removing where clause and see the values of temp and errors for each receiverId&lt;/P&gt;</description>
      <pubDate>Thu, 11 Oct 2018 20:03:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-join-functionality-without-using-subsearch/m-p/415231#M119552</guid>
      <dc:creator>Vijeta</dc:creator>
      <dc:date>2018-10-11T20:03:13Z</dc:date>
    </item>
    <item>
      <title>Re: How do you get join functionality without using subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-join-functionality-without-using-subsearch/m-p/415232#M119553</link>
      <description>&lt;P&gt;Please note, i'm doing a stats count by receiverId within second search. So you still expect the unique receiverId to be greater than 50k? &lt;/P&gt;</description>
      <pubDate>Fri, 12 Oct 2018 09:45:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-join-functionality-without-using-subsearch/m-p/415232#M119553</guid>
      <dc:creator>koshyk</dc:creator>
      <dc:date>2018-10-12T09:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: How do you get join functionality without using subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-join-functionality-without-using-subsearch/m-p/415233#M119554</link>
      <description>&lt;P&gt;Yeah it would be closer to a million.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Oct 2018 12:36:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-join-functionality-without-using-subsearch/m-p/415233#M119554</guid>
      <dc:creator>djain</dc:creator>
      <dc:date>2018-10-12T12:36:54Z</dc:date>
    </item>
    <item>
      <title>Re: How do you get join functionality without using subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-join-functionality-without-using-subsearch/m-p/415234#M119555</link>
      <description>&lt;P&gt;I figured out a way to do it, I took the coalesce idea from @adonio . Thank you for that. Here is the solution query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index = abc (sourcetype=abc_errors OR sourcetype=abc_temp)
   | fields sourcetype receiverId billingId device.headwaters.watermark.core.DeviceInfo.receiverId.string 
    | rename device.headwaters.watermark.core.DeviceInfo.receiverId.string AS  Receiver
    | eval receiver_id = coalesce(Receiver, receiverId ) 
    | dedup receiver_id sourcetype 
    | stats count(sourcetype) AS total BY receiver_id
    | where total&amp;gt;1 
    | stats count(receiver_id) AS match
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thank you everyone for your input&lt;/P&gt;</description>
      <pubDate>Fri, 12 Oct 2018 16:48:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-get-join-functionality-without-using-subsearch/m-p/415234#M119555</guid>
      <dc:creator>djain</dc:creator>
      <dc:date>2018-10-12T16:48:11Z</dc:date>
    </item>
  </channel>
</rss>

