<?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: Basic join on two virtual indexes in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Basic-join-on-two-virtual-indexes/m-p/266099#M80014</link>
    <description>&lt;P&gt;In #3 you've omitted the long number from the joined search, and the index= has gone missing. In the spirit of today's excellent virtual.conf talk by @sideview (recording here: &lt;A href="http://wiki.splunk.com/Virtual_.conf"&gt;http://wiki.splunk.com/Virtual_.conf&lt;/A&gt; ), try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index=claim OR index=provider) 362657618 | eval common_tin = if(index="claim", prov_tin, tin) | stats values(*) as * by common_tin
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 31 Mar 2016 20:07:05 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2016-03-31T20:07:05Z</dc:date>
    <item>
      <title>Basic join on two virtual indexes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Basic-join-on-two-virtual-indexes/m-p/266093#M80008</link>
      <description>&lt;P&gt;We have a claims table in Hunk and a provider table, both came from an RDBMS to Hadoop via sqoop.&lt;BR /&gt;
How can I join these two tables on the provider id, which is a foreign key on the claims table and the primary key on the provider table?&lt;/P&gt;

&lt;P&gt;I see &lt;A href="https://answers.splunk.com/answers/122594/hunk-join-2-virtual-indexes.html"&gt;https://answers.splunk.com/answers/122594/hunk-join-2-virtual-indexes.html&lt;/A&gt;, but I'm not clear about it...&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2016 21:38:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Basic-join-on-two-virtual-indexes/m-p/266093#M80008</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2016-03-30T21:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: Basic join on two virtual indexes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Basic-join-on-two-virtual-indexes/m-p/266094#M80009</link>
      <description>&lt;P&gt;This isn't Hunk-specific, but should apply regardless: &lt;A href="https://answers.splunk.com/answers/129424/how-to-compare-fields-over-multiple-sourcetypes-without-join-append-or-use-of-subsearches.html"&gt;https://answers.splunk.com/answers/129424/how-to-compare-fields-over-multiple-sourcetypes-without-join-append-or-use-of-subsearches.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2016 22:01:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Basic-join-on-two-virtual-indexes/m-p/266094#M80009</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2016-03-30T22:01:12Z</dc:date>
    </item>
    <item>
      <title>Re: Basic join on two virtual indexes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Basic-join-on-two-virtual-indexes/m-p/266095#M80010</link>
      <description>&lt;P&gt;The other angle to solve this is by accessing the database directly using Hunk with the DBConnect App - Lookup command:&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/DBX/latest/DeployDBX/Createandmanagedatabaselookups"&gt;http://docs.splunk.com/Documentation/DBX/latest/DeployDBX/Createandmanagedatabaselookups&lt;/A&gt;&lt;BR /&gt;
and&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.3.3/SearchReference/SQLtoSplunk"&gt;http://docs.splunk.com/Documentation/Splunk/6.3.3/SearchReference/SQLtoSplunk&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2016 22:50:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Basic-join-on-two-virtual-indexes/m-p/266095#M80010</guid>
      <dc:creator>rdagan_splunk</dc:creator>
      <dc:date>2016-03-30T22:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: Basic join on two virtual indexes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Basic-join-on-two-virtual-indexes/m-p/266096#M80011</link>
      <description>&lt;P&gt;Interesting thing but, at this point, we probably won't choose to make a round-trip back to the DB. &lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2016 15:50:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Basic-join-on-two-virtual-indexes/m-p/266096#M80011</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2016-03-31T15:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: Basic join on two virtual indexes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Basic-join-on-two-virtual-indexes/m-p/266097#M80012</link>
      <description>&lt;P&gt;Much appreciated - let me please check it...&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2016 15:52:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Basic-join-on-two-virtual-indexes/m-p/266097#M80012</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2016-03-31T15:52:28Z</dc:date>
    </item>
    <item>
      <title>Re: Basic join on two virtual indexes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Basic-join-on-two-virtual-indexes/m-p/266098#M80013</link>
      <description>&lt;P&gt;I'm trying the join command first ; - )&lt;/P&gt;

&lt;P&gt;1) index=claim 362657618 &lt;BR /&gt;
---- It immediately brings prov_tin as a numerical field&lt;/P&gt;

&lt;P&gt;2) index=provider 362657618&lt;BR /&gt;&lt;BR /&gt;
---- It immediately brings tin as a numerical field&lt;/P&gt;

&lt;P&gt;3) index=claim 362657618 | join prov_tin [search provider | rename tin AS prov_tin] &lt;BR /&gt;
---- It spins and spins&lt;/P&gt;

&lt;P&gt;Is the syntax of #3 right?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:14:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Basic-join-on-two-virtual-indexes/m-p/266098#M80013</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2020-09-29T09:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: Basic join on two virtual indexes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Basic-join-on-two-virtual-indexes/m-p/266099#M80014</link>
      <description>&lt;P&gt;In #3 you've omitted the long number from the joined search, and the index= has gone missing. In the spirit of today's excellent virtual.conf talk by @sideview (recording here: &lt;A href="http://wiki.splunk.com/Virtual_.conf"&gt;http://wiki.splunk.com/Virtual_.conf&lt;/A&gt; ), try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index=claim OR index=provider) 362657618 | eval common_tin = if(index="claim", prov_tin, tin) | stats values(*) as * by common_tin
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 31 Mar 2016 20:07:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Basic-join-on-two-virtual-indexes/m-p/266099#M80014</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2016-03-31T20:07:05Z</dc:date>
    </item>
    <item>
      <title>Re: Basic join on two virtual indexes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Basic-join-on-two-virtual-indexes/m-p/266100#M80015</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;values(*) as *
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;is awesome, provided that you put an explicit fields command in front of it...    If (when) you ever have 100 or more fields incoming, search speed and memory usage can blow up unexpectedly.  &lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2016 22:04:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Basic-join-on-two-virtual-indexes/m-p/266100#M80015</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2016-03-31T22:04:09Z</dc:date>
    </item>
    <item>
      <title>Re: Basic join on two virtual indexes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Basic-join-on-two-virtual-indexes/m-p/266101#M80016</link>
      <description>&lt;P&gt;It's the best I can do with the information given in the question &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2016 22:18:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Basic-join-on-two-virtual-indexes/m-p/266101#M80016</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2016-03-31T22:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: Basic join on two virtual indexes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Basic-join-on-two-virtual-indexes/m-p/266102#M80017</link>
      <description>&lt;P&gt;Thank you Martin!!&lt;/P&gt;

&lt;P&gt;The query runs for 20 minutes or so but nothing comes back. Let's keep in mind that the claim index holds around 2 billion claims and each of them has hundreds of fields. &lt;/P&gt;

&lt;P&gt;I do see the MapR job being generated and it's visible via the resource manager.&lt;/P&gt;

&lt;P&gt;In order to run on it on a subset of the data I changed the first part to be -&lt;BR /&gt;
((index=claim source="&lt;EM&gt;part-m-00078&lt;/EM&gt;") OR index=provider) 362657618 &lt;BR /&gt;
The intent is to run the query only on one sqoop file. Does it look right?&lt;/P&gt;

&lt;P&gt;I do get results now but I'm not sure they are right...&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2016 23:05:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Basic-join-on-two-virtual-indexes/m-p/266102#M80017</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2016-03-31T23:05:31Z</dc:date>
    </item>
  </channel>
</rss>

