<?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: Joining Data in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Joining-Data/m-p/174507#M50077</link>
    <description>&lt;P&gt;What's your actual use case?&lt;/P&gt;

&lt;P&gt;Working off an existing search only is often futile for finding the best approach.&lt;/P&gt;</description>
    <pubDate>Wed, 05 Mar 2014 10:39:29 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2014-03-05T10:39:29Z</dc:date>
    <item>
      <title>Joining Data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-Data/m-p/174506#M50076</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;HostA contains employer_code like (A,B,C,D,E,F,G)&lt;BR /&gt;
HostB contains ER Code like (A,A,B,D,D)          &lt;/P&gt;

&lt;P&gt;I am trying to join 2 data sources with below query.&lt;BR /&gt;
host=HostA|join employer_code [search host=HostB| eval "ER Code"=employer_code]&lt;/P&gt;

&lt;P&gt;I am not getting result like inner join in SQL.&lt;BR /&gt;
Can anybody help.Is there any other way to solve this issue rather than join?&lt;BR /&gt;
Can we achieve this by sub search?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:02:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-Data/m-p/174506#M50076</guid>
      <dc:creator>jimjohn</dc:creator>
      <dc:date>2020-09-28T16:02:42Z</dc:date>
    </item>
    <item>
      <title>Re: Joining Data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-Data/m-p/174507#M50077</link>
      <description>&lt;P&gt;What's your actual use case?&lt;/P&gt;

&lt;P&gt;Working off an existing search only is often futile for finding the best approach.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2014 10:39:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-Data/m-p/174507#M50077</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-03-05T10:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: Joining Data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-Data/m-p/174508#M50078</link>
      <description>&lt;P&gt;My SQL will be like this.&lt;/P&gt;

&lt;P&gt;select avg(a.field1),count(b.field2)&lt;BR /&gt;
from HostA  a&lt;BR /&gt;
join HostB b on a.empId=b.ErID&lt;BR /&gt;
group by a.field,b.field2;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2014 12:55:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-Data/m-p/174508#M50078</guid>
      <dc:creator>jimjohn</dc:creator>
      <dc:date>2014-03-05T12:55:59Z</dc:date>
    </item>
    <item>
      <title>Re: Joining Data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-Data/m-p/174509#M50079</link>
      <description>&lt;P&gt;i need to convert above SQL to splunk serarch&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2014 12:56:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-Data/m-p/174509#M50079</guid>
      <dc:creator>jimjohn</dc:creator>
      <dc:date>2014-03-05T12:56:30Z</dc:date>
    </item>
    <item>
      <title>Re: Joining Data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-Data/m-p/174510#M50080</link>
      <description>&lt;P&gt;Try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=HostA OR host=HostB ... rest of your search string...
| eval employer_code=if(host="HostB",ErID,employer_code)
| stats avg(field1) count(field2) by employer_code
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Join&lt;/STRONG&gt; may not be necessary in Splunk and is often an expensive operation.  Does this get you closer to what you need?&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2014 13:10:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-Data/m-p/174510#M50080</guid>
      <dc:creator>wpreston</dc:creator>
      <dc:date>2014-03-05T13:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: Joining Data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-Data/m-p/174511#M50081</link>
      <description>&lt;P&gt;or use Splunk DB connect and run the SQL statment as &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| dbquery database your SQLfu&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;if you are more comfortable with SQL&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2014 13:14:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-Data/m-p/174511#M50081</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2014-03-05T13:14:29Z</dc:date>
    </item>
  </channel>
</rss>

