<?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 What is the best way to join a row with rows in another table? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-a-row-with-rows-in-another-table/m-p/246217#M73410</link>
    <description>&lt;P&gt;Hi guys,&lt;/P&gt;

&lt;P&gt;I need to create a join with a row, and this row has multiple occurrences in another table. What is the best way to do this?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Thu, 07 Jul 2016 12:38:19 GMT</pubDate>
    <dc:creator>Buscatrufas</dc:creator>
    <dc:date>2016-07-07T12:38:19Z</dc:date>
    <item>
      <title>What is the best way to join a row with rows in another table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-a-row-with-rows-in-another-table/m-p/246217#M73410</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;

&lt;P&gt;I need to create a join with a row, and this row has multiple occurrences in another table. What is the best way to do this?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2016 12:38:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-a-row-with-rows-in-another-table/m-p/246217#M73410</guid>
      <dc:creator>Buscatrufas</dc:creator>
      <dc:date>2016-07-07T12:38:19Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best way to join a row with rows in another table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-a-row-with-rows-in-another-table/m-p/246218#M73411</link>
      <description>&lt;P&gt;Can you please include a couple of each "side" of the events that need to be joined together?  And how do they fit together?&lt;/P&gt;

&lt;P&gt;I'll also mention that it's pretty rare to actually need &lt;CODE&gt;join&lt;/CODE&gt; itself, there is usually a much faster, easier method.&lt;/P&gt;

&lt;P&gt;For instance, &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=A OR sourcetype=B | stats list(_raw) by MyCommonField
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now that's a terrible example because you likely don't want to &lt;CODE&gt;list(_raw)&lt;/CODE&gt; in the output, but it is nevertheless an example.  &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;It would pull up all events that match either sourcetype (think SQL union), then the stats command would essentially group them together by the common field, whatever that is, doing what most folks consider a "join".&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2016 13:17:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-a-row-with-rows-in-another-table/m-p/246218#M73411</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2016-07-07T13:17:49Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best way to join a row with rows in another table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-a-row-with-rows-in-another-table/m-p/246219#M73412</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index=indexA sourcetype=sourcetypeA) OR (index=indexB sourcetype=sourcetypeB) | stats values(*) AS * BY MyCommonField
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 Jul 2016 13:21:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-join-a-row-with-rows-in-another-table/m-p/246219#M73412</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-07-07T13:21:04Z</dc:date>
    </item>
  </channel>
</rss>

