<?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 How do you fetch table data from join table? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-fetch-table-data-from-join-table/m-p/436190#M166975</link>
    <description>&lt;P&gt;There are two tables: "Table A" is a detailed information, and the "Table B" is the primary key.&lt;/P&gt;

&lt;P&gt;The two tables are associated with the primary key and only queries the information in the matching A table.&lt;/P&gt;

&lt;P&gt;Be similar to sql&lt;BR /&gt;
seledt T1.id from T1,T2 where T1.id=T2.id&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/5957i67DF65F2E4602489/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 17 Oct 2018 01:48:13 GMT</pubDate>
    <dc:creator>flzhang132</dc:creator>
    <dc:date>2018-10-17T01:48:13Z</dc:date>
    <item>
      <title>How do you fetch table data from join table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-fetch-table-data-from-join-table/m-p/436190#M166975</link>
      <description>&lt;P&gt;There are two tables: "Table A" is a detailed information, and the "Table B" is the primary key.&lt;/P&gt;

&lt;P&gt;The two tables are associated with the primary key and only queries the information in the matching A table.&lt;/P&gt;

&lt;P&gt;Be similar to sql&lt;BR /&gt;
seledt T1.id from T1,T2 where T1.id=T2.id&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/5957i67DF65F2E4602489/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Oct 2018 01:48:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-fetch-table-data-from-join-table/m-p/436190#M166975</guid>
      <dc:creator>flzhang132</dc:creator>
      <dc:date>2018-10-17T01:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: How do you fetch table data from join table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-fetch-table-data-from-join-table/m-p/436191#M166976</link>
      <description>&lt;P&gt;@flzhang132 ,&lt;/P&gt;

&lt;P&gt;Assuming you have different indexes or source types where you have this data,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"your search to get first dataset" OR "your search to get the second dataset" 
|stats values(project_name) as project_name,values(region) as region,values(fee) as fee,values(dmon) as domon by resourceid
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Another option is to use &lt;CODE&gt;join&lt;/CODE&gt;, which should be avoided if possible due to performance considerations&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"your search to get first dataset"
|join resourceid ["your search to get the second dataset"]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 17 Oct 2018 02:54:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-fetch-table-data-from-join-table/m-p/436191#M166976</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2018-10-17T02:54:25Z</dc:date>
    </item>
    <item>
      <title>Re: How do you fetch table data from join table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-fetch-table-data-from-join-table/m-p/436192#M166977</link>
      <description>&lt;P&gt;please ? How can i get data from same table with self join&lt;BR /&gt;
Be similar to sql&lt;BR /&gt;
select  T2.id&lt;BR /&gt;
from  table T1&lt;BR /&gt;
          ,table T2&lt;BR /&gt;
where T1.id = T2.id&lt;/P&gt;</description>
      <pubDate>Wed, 17 Oct 2018 03:38:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-fetch-table-data-from-join-table/m-p/436192#M166977</guid>
      <dc:creator>flzhang132</dc:creator>
      <dc:date>2018-10-17T03:38:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do you fetch table data from join table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-fetch-table-data-from-join-table/m-p/436193#M166978</link>
      <description>&lt;P&gt;@flzhang132 , do you mean to say, you have these events in the same source? just for clarification, why do you need this join when you dont have any interesting field in the other dataset but all the fields are in say table A ? Do you have some sample events (mask any confidential data) to let us know what you have and what's your expected output&lt;/P&gt;</description>
      <pubDate>Wed, 17 Oct 2018 05:25:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-fetch-table-data-from-join-table/m-p/436193#M166978</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2018-10-17T05:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: How do you fetch table data from join table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-fetch-table-data-from-join-table/m-p/436194#M166979</link>
      <description>&lt;P&gt;In that case it's better use the transaction comand for the self join.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Oct 2018 08:58:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-fetch-table-data-from-join-table/m-p/436194#M166979</guid>
      <dc:creator>asabatini85</dc:creator>
      <dc:date>2018-10-17T08:58:19Z</dc:date>
    </item>
  </channel>
</rss>

