<?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 do I complete a search including common and unique data fields from two different sources? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-complete-a-search-including-common-and-unique-data/m-p/356471#M65126</link>
    <description>&lt;P&gt;At its most trivial, you want something like this &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; ( search for event type 1) OR (search for event type 2) 
| fields _time time ID amount result rating
| stats values(*) as * by ID
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For more complete description of what and why, look at martin_mueller's and my answers here - &lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/561130/sql-analogy-for-my-log-search-join-two-tables-wher.html#answer-561172"&gt;https://answers.splunk.com/answers/561130/sql-analogy-for-my-log-search-join-two-tables-wher.html#answer-561172&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 09 Aug 2017 22:24:38 GMT</pubDate>
    <dc:creator>DalJeanis</dc:creator>
    <dc:date>2017-08-09T22:24:38Z</dc:date>
    <item>
      <title>How do I complete a search including common and unique data fields from two different sources?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-complete-a-search-including-common-and-unique-data/m-p/356469#M65124</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I would like to run a query that includes results from our &lt;EM&gt;main index&lt;/EM&gt; as well as an uploaded &lt;EM&gt;CSV&lt;/EM&gt;. I don't think I want to &lt;EM&gt;join&lt;/EM&gt;, as it seems to leave out the unique data fields/values.&lt;/P&gt;

&lt;P&gt;Here's a made up example of what I mean:&lt;/P&gt;

&lt;P&gt;Main index contains - &lt;BR /&gt;
ID&lt;BR /&gt;
time&lt;BR /&gt;
amount&lt;BR /&gt;
result&lt;/P&gt;

&lt;P&gt;CSV contains - &lt;BR /&gt;
ID&lt;BR /&gt;
time&lt;BR /&gt;
amount&lt;BR /&gt;
rating&lt;/P&gt;

&lt;P&gt;So what I'd like is to search the common fields 'ID', 'time' and 'amount' and receive all transactions (from both sources) that contain values for those fields AS WELL AS receive the unique fields 'result', 'rating' from each data source in a single search result. &lt;/P&gt;

&lt;P&gt;Further simplified, I want to search ID=  time=  amount=   and in my results see data from both sources, along with the fields 'result' and 'rating' where applicable. &lt;/P&gt;

&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2017 20:19:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-complete-a-search-including-common-and-unique-data/m-p/356469#M65124</guid>
      <dc:creator>jredsama</dc:creator>
      <dc:date>2017-08-09T20:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: How do I complete a search including common and unique data fields from two different sources?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-complete-a-search-including-common-and-unique-data/m-p/356470#M65125</link>
      <description>&lt;P&gt;You can do an outer join&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; ...| join type=outer
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or you can load both sets of data in the pipe (best method)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; (index=mainIndex) OR (index=csvIndex)  ID=xyz time=xyz amount=xyz| ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 09 Aug 2017 21:18:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-complete-a-search-including-common-and-unique-data/m-p/356470#M65125</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2017-08-09T21:18:47Z</dc:date>
    </item>
    <item>
      <title>Re: How do I complete a search including common and unique data fields from two different sources?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-complete-a-search-including-common-and-unique-data/m-p/356471#M65126</link>
      <description>&lt;P&gt;At its most trivial, you want something like this &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; ( search for event type 1) OR (search for event type 2) 
| fields _time time ID amount result rating
| stats values(*) as * by ID
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For more complete description of what and why, look at martin_mueller's and my answers here - &lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/561130/sql-analogy-for-my-log-search-join-two-tables-wher.html#answer-561172"&gt;https://answers.splunk.com/answers/561130/sql-analogy-for-my-log-search-join-two-tables-wher.html#answer-561172&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2017 22:24:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-complete-a-search-including-common-and-unique-data/m-p/356471#M65126</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-08-09T22:24:38Z</dc:date>
    </item>
  </channel>
</rss>

