<?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: problem with join in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/problem-with-join/m-p/348812#M162331</link>
    <description>&lt;P&gt;my basic requirement :  as you said there are more than 60k rows which i am looking to join due to which its not joining completely . i just need to add 3 columns from the 2nd index to the  columns of 1st index. i need help with query.&lt;BR /&gt;
due to 60k rows, its not joining all of them.&lt;/P&gt;</description>
    <pubDate>Thu, 15 Mar 2018 04:16:37 GMT</pubDate>
    <dc:creator>jiaqya</dc:creator>
    <dc:date>2018-03-15T04:16:37Z</dc:date>
    <item>
      <title>problem with join</title>
      <link>https://community.splunk.com/t5/Splunk-Search/problem-with-join/m-p/348807#M162326</link>
      <description>&lt;P&gt;i am trying to join 2 indexes and ClientName. &lt;BR /&gt;
i find some rows are not joining on ClientName.&lt;BR /&gt;
but if i explicitly mention ClientName="actualname" then i get the output of join.&lt;BR /&gt;
if i dont mention it explicitly it works for most but does not work for few.&lt;/P&gt;

&lt;P&gt;ex: this one does not give me output&lt;BR /&gt;
index=sccm_sccmclient earliest=-2d@d latest=now ClientName="actualclient" |dedup ClientName sortby -_time| table ClientName,City,OU,SP,OS | eval ClientName=lower(ClientName) |eval ClientName=mvindex(split(ClientName,"."),0)|join type=left ClientName[search index=itsm_computers | eval ClientName=lower(ClientName) |eval ClientName=mvindex(split(ClientName,"."),0)]|table ClientName,Region,SiteCode&lt;/P&gt;

&lt;P&gt;this one gives output&lt;BR /&gt;
index=sccm_sccmclient earliest=-2d@d latest=now ClientName="actualclient" |dedup ClientName sortby -_time| table ClientName,City,OU,SP,OS | eval ClientName=lower(ClientName) |eval ClientName=mvindex(split(ClientName,"."),0)|join type=left ClientName[search index=itsm_computers ClientName="actualclient" | eval ClientName=lower(ClientName) |eval ClientName=mvindex(split(ClientName,"."),0)]|table ClientName,Region,SiteCode&lt;/P&gt;

&lt;P&gt;i am not able to understand this why ? whats the difference here..&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:26:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/problem-with-join/m-p/348807#M162326</guid>
      <dc:creator>jiaqya</dc:creator>
      <dc:date>2020-09-29T18:26:41Z</dc:date>
    </item>
    <item>
      <title>Re: problem with join</title>
      <link>https://community.splunk.com/t5/Splunk-Search/problem-with-join/m-p/348808#M162327</link>
      <description>&lt;P&gt;Can you try:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=sccm_sccmclient earliest=-2d@d latest=now ClientName="actualclient" |dedup ClientName sortby -_time| table ClientName,City,OU,SP,OS | eval ClientName=lower(ClientName) |eval ClientName=mvindex(split(ClientName,"."),0)|join type=left ClientName[search index=itsm_computers ClientName="*" | eval ClientName=lower(ClientName) |eval ClientName=mvindex(split(ClientName,"."),0)]|table ClientName,Region,SiteCode
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 14 Mar 2018 12:47:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/problem-with-join/m-p/348808#M162327</guid>
      <dc:creator>p_gurav</dc:creator>
      <dc:date>2018-03-14T12:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: problem with join</title>
      <link>https://community.splunk.com/t5/Splunk-Search/problem-with-join/m-p/348809#M162328</link>
      <description>&lt;P&gt;First, how many events are being returned from the second search? There is a limit, and my guess is that the first search hits the limit, but that the second search - because it is constrained to a single client name - does not hit the limit.&lt;/P&gt;

&lt;P&gt;Second, you may not be showing the entire search, but I see no need for the join at all. The following search would be much more efficient, although it might not be exactly what you wanted&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index=sccm_sccmclient OR index= itsm_computers) ClientName="actualclient" 
| fields ClientName City OU SP OS Region SiteCode
| stats list(*) as * by ClientName
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 14 Mar 2018 13:09:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/problem-with-join/m-p/348809#M162328</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2018-03-14T13:09:24Z</dc:date>
    </item>
    <item>
      <title>Re: problem with join</title>
      <link>https://community.splunk.com/t5/Splunk-Search/problem-with-join/m-p/348810#M162329</link>
      <description>&lt;P&gt;Iguinn, Thanks a lot, this query you gave is much faster , but i have one correction to make, &lt;/P&gt;

&lt;P&gt;the first index sccm_sccmclient has 30k row and the second one itsm_computers has 60k rows.&lt;BR /&gt;
so with the query you mentioned im getting back 90k rows. &lt;/P&gt;

&lt;P&gt;i want the first index to be basically the base so i should only get column updates to these 30k rows only. how can this be done with the above query..&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:26:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/problem-with-join/m-p/348810#M162329</guid>
      <dc:creator>jiaqya</dc:creator>
      <dc:date>2020-09-29T18:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: problem with join</title>
      <link>https://community.splunk.com/t5/Splunk-Search/problem-with-join/m-p/348811#M162330</link>
      <description>&lt;P&gt;Iguinn, would it work if i use the sourcetype&lt;/P&gt;

&lt;P&gt;both these indexes have different sourcetype names. i could just ignore the 2nd sourcetype so i get the updated columns for the 1st source type.&lt;/P&gt;

&lt;P&gt;would this be a good way to achieve this..&lt;/P&gt;</description>
      <pubDate>Wed, 14 Mar 2018 14:20:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/problem-with-join/m-p/348811#M162330</guid>
      <dc:creator>jiaqya</dc:creator>
      <dc:date>2018-03-14T14:20:15Z</dc:date>
    </item>
    <item>
      <title>Re: problem with join</title>
      <link>https://community.splunk.com/t5/Splunk-Search/problem-with-join/m-p/348812#M162331</link>
      <description>&lt;P&gt;my basic requirement :  as you said there are more than 60k rows which i am looking to join due to which its not joining completely . i just need to add 3 columns from the 2nd index to the  columns of 1st index. i need help with query.&lt;BR /&gt;
due to 60k rows, its not joining all of them.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Mar 2018 04:16:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/problem-with-join/m-p/348812#M162331</guid>
      <dc:creator>jiaqya</dc:creator>
      <dc:date>2018-03-15T04:16:37Z</dc:date>
    </item>
    <item>
      <title>Re: problem with join</title>
      <link>https://community.splunk.com/t5/Splunk-Search/problem-with-join/m-p/348813#M162332</link>
      <description>&lt;P&gt;instead of choosing to increase the limit for join , i went ahead and used the lookup option. this works well for me..&lt;BR /&gt;
Iguinn , thanks for the direction..&lt;/P&gt;

&lt;P&gt;previous query &amp;gt; | lookup test.csv ClientName OUTPUT |table ClientName,City,Site,OU&lt;/P&gt;

&lt;P&gt;john.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Mar 2018 14:33:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/problem-with-join/m-p/348813#M162332</guid>
      <dc:creator>jiaqya</dc:creator>
      <dc:date>2018-03-16T14:33:17Z</dc:date>
    </item>
  </channel>
</rss>

