<?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 to search in the subquery for join? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-in-the-subquery-for-join/m-p/435963#M124283</link>
    <description>&lt;P&gt;Oops, error on my part, I had an invalid serial number&lt;/P&gt;</description>
    <pubDate>Tue, 05 Jun 2018 14:39:21 GMT</pubDate>
    <dc:creator>bshega</dc:creator>
    <dc:date>2018-06-05T14:39:21Z</dc:date>
    <item>
      <title>How to search in the subquery for join?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-in-the-subquery-for-join/m-p/435956#M124276</link>
      <description>&lt;P&gt;I have a query that is similar to this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=iot-productiondb source=Showers | search serial_number="1006055" | rename id as shower_id | join shower_id max=0 [ search index=iot-productiondb source=Recordings ] | sort + created_at | table created_at rssi | rename created_at as "Action Time" rssi as "RSSI Value"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But the problem is the subquery &lt;CODE&gt;search index=iot-productiondb source=Recordings&lt;/CODE&gt; has about 20 million records which far surpasses the 50k limit.  Is there a way I can limit that query so that it only looks for records for the matching shower? I've tried searching for the shower's id using &lt;CODE&gt;search shower_id="$shower_id$"&lt;/CODE&gt; but I think that is performing an infinite loop or something.&lt;/P&gt;

&lt;P&gt;Is there any way to get all of the records for this join instead of just what is retrieved from the 50k records?&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jun 2018 18:28:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-in-the-subquery-for-join/m-p/435956#M124276</guid>
      <dc:creator>bshega</dc:creator>
      <dc:date>2018-06-04T18:28:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to search in the subquery for join?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-in-the-subquery-for-join/m-p/435957#M124277</link>
      <description>&lt;P&gt;Hi There,&lt;/P&gt;

&lt;P&gt;Have you tried creating the query without the join, if you searched both sourcetypes and played around with transactions by the shower_id you might be able to get the result you are looking for. Might require a few evals to sort out the required fields but should be an option to get around the limitations of the join command&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jun 2018 19:20:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-in-the-subquery-for-join/m-p/435957#M124277</guid>
      <dc:creator>paulbannister</dc:creator>
      <dc:date>2018-06-04T19:20:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to search in the subquery for join?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-in-the-subquery-for-join/m-p/435958#M124278</link>
      <description>&lt;P&gt;can you try the following query?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=iot-productiondb source=Showers serial_number="1006055" OR index=iot-productiondb source=Recordings
    | eval normalized_id = coalesce(id, shower_id)
    | sort + created_at 
    | table created_at rssi 
    | rename created_at as "Action Time" rssi as "RSSI Value"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;please share some sample data from both sources as well as the desired results so we can better assist you &lt;/P&gt;</description>
      <pubDate>Mon, 04 Jun 2018 19:39:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-in-the-subquery-for-join/m-p/435958#M124278</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2018-06-04T19:39:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to search in the subquery for join?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-in-the-subquery-for-join/m-p/435959#M124279</link>
      <description>&lt;P&gt;I have &lt;CODE&gt;Shower&lt;/CODE&gt; that has a &lt;CODE&gt;serial_number&lt;/CODE&gt; and &lt;CODE&gt;Recording&lt;/CODE&gt; which has an &lt;CODE&gt;rssi&lt;/CODE&gt; we search on the shower's serial_number and need to get the RSSI from every recording from that shower.  I hope that helps.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jun 2018 20:00:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-in-the-subquery-for-join/m-p/435959#M124279</guid>
      <dc:creator>bshega</dc:creator>
      <dc:date>2018-06-04T20:00:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to search in the subquery for join?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-in-the-subquery-for-join/m-p/435960#M124280</link>
      <description>&lt;P&gt;YOur final output has two columns: created_at and rssi. On which source(s) both columns exist?. How many rows does your base search (which fetches shower_id/serial_number?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:46:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-in-the-subquery-for-join/m-p/435960#M124280</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2020-09-29T19:46:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to search in the subquery for join?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-in-the-subquery-for-join/m-p/435961#M124281</link>
      <description>&lt;P&gt;Are you looking for all Recordings for a particular Shower?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=iot-productiondb source=Recordings [search index=iot-productiondb source=Showers serial_number="1006055" id=* | head 1 | table id | rename id as shower_id]
| sort + created_at | table created_at rssi | rename created_at as "Action Time" rssi as "RSSI Value"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That will search the Showers for the shower id that matches your serial number, and then use that shower id to look for matching recordings. It's a much more splunky way than your join - that loads all recordings, attempts to join all recordings, and then throws away all non-matching recordings.&lt;/P&gt;

&lt;P&gt;Note, I'm assuming the created_at and rssi fields come from the Recordings source.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jun 2018 21:37:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-in-the-subquery-for-join/m-p/435961#M124281</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2018-06-04T21:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to search in the subquery for join?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-in-the-subquery-for-join/m-p/435962#M124282</link>
      <description>&lt;P&gt;I tried this but I'm not getting any results back.  Is there supposed to be a join in there somewhere?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 14:38:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-in-the-subquery-for-join/m-p/435962#M124282</guid>
      <dc:creator>bshega</dc:creator>
      <dc:date>2018-06-05T14:38:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to search in the subquery for join?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-in-the-subquery-for-join/m-p/435963#M124283</link>
      <description>&lt;P&gt;Oops, error on my part, I had an invalid serial number&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 14:39:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-in-the-subquery-for-join/m-p/435963#M124283</guid>
      <dc:creator>bshega</dc:creator>
      <dc:date>2018-06-05T14:39:21Z</dc:date>
    </item>
  </channel>
</rss>

