<?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 join data from three sources without using join? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-join-data-from-three-sources-without-using-join/m-p/131138#M35770</link>
    <description>&lt;P&gt;The problem you had with &lt;CODE&gt;eventstats&lt;/CODE&gt; that necessitated using &lt;CODE&gt;fillnull&lt;/CODE&gt; sounds like a bug to me and I am sure it only happened because you were &lt;EM&gt;overwriting&lt;/EM&gt; field values by recycling names (e.g. &lt;CODE&gt;values(Title) AS Title&lt;/CODE&gt;) and furthermore that some events had the field while others did not.  I have never had to use &lt;CODE&gt;fillnull&lt;/CODE&gt; for this purpose before.&lt;/P&gt;</description>
    <pubDate>Fri, 29 May 2015 22:09:47 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2015-05-29T22:09:47Z</dc:date>
    <item>
      <title>How to join data from three sources without using join?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-join-data-from-three-sources-without-using-join/m-p/131133#M35765</link>
      <description>&lt;P&gt;I'm slowly digesting the posts that describe how to use stats to retrieve aligned data from multiple sources but I'm having a little trouble with how to extend the concept to a three source scenario where not all three sources share one common field. For example...&lt;/P&gt;

&lt;P&gt;User: Name, City&lt;BR /&gt;
Activity: Id, Name, Action, Target&lt;BR /&gt;
Product: Id, Title, Type&lt;/P&gt;

&lt;P&gt;I want to select Name, City, Action, Title, Type where User.Name=Activity.Name and Activity.Target=Product.Id&lt;/P&gt;

&lt;P&gt;Can this be done with stats?&lt;/P&gt;

&lt;P&gt;Ultimately what I'm trying to do is to show information about the Top 10 Products for a specific City and Action.&lt;/P&gt;</description>
      <pubDate>Fri, 29 May 2015 19:02:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-join-data-from-three-sources-without-using-join/m-p/131133#M35765</guid>
      <dc:creator>kmcarrol</dc:creator>
      <dc:date>2015-05-29T19:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to join data from three sources without using join?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-join-data-from-three-sources-without-using-join/m-p/131134#M35766</link>
      <description>&lt;P&gt;Sorry, forgot to mention that the three sources are setup as different indexes. For example, index=user. All three indexes contain more than 50,000 events.&lt;/P&gt;</description>
      <pubDate>Fri, 29 May 2015 19:03:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-join-data-from-three-sources-without-using-join/m-p/131134#M35766</guid>
      <dc:creator>kmcarrol</dc:creator>
      <dc:date>2015-05-29T19:03:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to join data from three sources without using join?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-join-data-from-three-sources-without-using-join/m-p/131135#M35767</link>
      <description>&lt;P&gt;This &lt;EM&gt;should&lt;/EM&gt; get you most of the way there:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=User OR index=Activity OR index=Product | eventstats values(Title) values(Type) BY Id | eventstats values(City) by Name | search index=Activity
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This augments the "Activity" events with the data from the other events.&lt;/P&gt;</description>
      <pubDate>Fri, 29 May 2015 20:16:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-join-data-from-three-sources-without-using-join/m-p/131135#M35767</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-05-29T20:16:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to join data from three sources without using join?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-join-data-from-three-sources-without-using-join/m-p/131136#M35768</link>
      <description>&lt;P&gt;Had to do quite a bit of tweaking but that moved me in the right direction...&lt;BR /&gt;
  1) renaming Target as Id successfully overwrote the unnecessary field with the needed data&lt;BR /&gt;
  2) eventstats doesn't seem to want to write the field to an event unless that field is non-null to begin with&lt;BR /&gt;
  3) needed to do an mvexpand on the Title and then search where Title!=""&lt;/P&gt;

&lt;P&gt;Ended up with something more like this...&lt;/P&gt;

&lt;P&gt;index=User OR index=Activity OR index=Product&lt;BR /&gt;
 | rename Target as Id&lt;BR /&gt;
 | fillnull value="" Title, Type, City&lt;BR /&gt;
 | eventstats values(Title) as Title, values(Type) as Type by Id&lt;BR /&gt;
 | eventstats values(City) as City by Name&lt;BR /&gt;
 | mvexpand Title&lt;BR /&gt;
 | search index=Activity Title!=""&lt;/P&gt;

&lt;P&gt;Now I'm just running into the infamous Bad Allocation error. I may have to generate a couple of summary indexes and search that data. Any other ideas?&lt;/P&gt;</description>
      <pubDate>Fri, 29 May 2015 21:48:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-join-data-from-three-sources-without-using-join/m-p/131136#M35768</guid>
      <dc:creator>kmcarrol</dc:creator>
      <dc:date>2015-05-29T21:48:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to join data from three sources without using join?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-join-data-from-three-sources-without-using-join/m-p/131137#M35769</link>
      <description>&lt;P&gt;Buy more RAM (and "Accept" my answer)!&lt;/P&gt;</description>
      <pubDate>Fri, 29 May 2015 22:06:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-join-data-from-three-sources-without-using-join/m-p/131137#M35769</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-05-29T22:06:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to join data from three sources without using join?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-join-data-from-three-sources-without-using-join/m-p/131138#M35770</link>
      <description>&lt;P&gt;The problem you had with &lt;CODE&gt;eventstats&lt;/CODE&gt; that necessitated using &lt;CODE&gt;fillnull&lt;/CODE&gt; sounds like a bug to me and I am sure it only happened because you were &lt;EM&gt;overwriting&lt;/EM&gt; field values by recycling names (e.g. &lt;CODE&gt;values(Title) AS Title&lt;/CODE&gt;) and furthermore that some events had the field while others did not.  I have never had to use &lt;CODE&gt;fillnull&lt;/CODE&gt; for this purpose before.&lt;/P&gt;</description>
      <pubDate>Fri, 29 May 2015 22:09:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-join-data-from-three-sources-without-using-join/m-p/131138#M35770</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-05-29T22:09:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to join data from three sources without using join?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-join-data-from-three-sources-without-using-join/m-p/131139#M35771</link>
      <description>&lt;P&gt;No, actually I was originally using unique names like TitleValues and if the event had no field called Title, it wouldn't add a value to TitleValues. That does sound like a bug to me as well.&lt;/P&gt;</description>
      <pubDate>Fri, 29 May 2015 23:32:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-join-data-from-three-sources-without-using-join/m-p/131139#M35771</guid>
      <dc:creator>kmcarrol</dc:creator>
      <dc:date>2015-05-29T23:32:52Z</dc:date>
    </item>
  </channel>
</rss>

