<?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 I am trying to combine three indexes using left join but not all the values are showing up even though the data exists. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/I-am-trying-to-combine-three-indexes-using-left-join-but-not-all/m-p/397768#M170929</link>
    <description>&lt;P&gt;index=A | stats count by host ID | eval ID=upper(ID) | rename host as HOST, ID as USERID, count as LOGIN_FAILURES |&lt;BR /&gt;
join USERID type=full [ search index=B earliest=-1d@d groupentitlements!=None | eval Username=upper(Username) | rename Username as USERID, GivenName as FIRST_NAME, Surname as LAST_NAME, groupentitlements as ENTITLEMENT, HomeDirectory as HOME_DIRECTORY | &lt;BR /&gt;
join USERID type=full [ search index=C earliest=-1d@d USERID | dedup USERID | eval USERID=upper(USERID) ] ] |&lt;BR /&gt;
table HOST USERID FIRST_NAME LAST_NAME LOGIN_FAILURES HOME_DIRECTORY TITLE ASSOCIATE PRIORITY_CUSTOMER ORGANIZATION_CODE CSS_BUSINESS_GROUP ENTITLEMENT BUILDING_NAME ADDRESS_LINE1 CITY STATE_CD COUNTRY | sort - LOGIN_FAILURES&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 00:45:16 GMT</pubDate>
    <dc:creator>dogaasad</dc:creator>
    <dc:date>2020-09-30T00:45:16Z</dc:date>
    <item>
      <title>I am trying to combine three indexes using left join but not all the values are showing up even though the data exists.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-am-trying-to-combine-three-indexes-using-left-join-but-not-all/m-p/397768#M170929</link>
      <description>&lt;P&gt;index=A | stats count by host ID | eval ID=upper(ID) | rename host as HOST, ID as USERID, count as LOGIN_FAILURES |&lt;BR /&gt;
join USERID type=full [ search index=B earliest=-1d@d groupentitlements!=None | eval Username=upper(Username) | rename Username as USERID, GivenName as FIRST_NAME, Surname as LAST_NAME, groupentitlements as ENTITLEMENT, HomeDirectory as HOME_DIRECTORY | &lt;BR /&gt;
join USERID type=full [ search index=C earliest=-1d@d USERID | dedup USERID | eval USERID=upper(USERID) ] ] |&lt;BR /&gt;
table HOST USERID FIRST_NAME LAST_NAME LOGIN_FAILURES HOME_DIRECTORY TITLE ASSOCIATE PRIORITY_CUSTOMER ORGANIZATION_CODE CSS_BUSINESS_GROUP ENTITLEMENT BUILDING_NAME ADDRESS_LINE1 CITY STATE_CD COUNTRY | sort - LOGIN_FAILURES&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:45:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-am-trying-to-combine-three-indexes-using-left-join-but-not-all/m-p/397768#M170929</guid>
      <dc:creator>dogaasad</dc:creator>
      <dc:date>2020-09-30T00:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: I am trying to combine three indexes using left join but not all the values are showing up even though the data exists.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-am-trying-to-combine-three-indexes-using-left-join-but-not-all/m-p/397769#M170930</link>
      <description>&lt;P&gt;I'd recommend first starting with formatting the query in Splunk by pressing CTRL and \ in the query window for readability purposes.&lt;/P&gt;

&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=A 
| stats count by host ID 
| eval ID=upper(ID) 
| rename host as HOST, ID as USERID, count as LOGIN_FAILURES 
| join USERID type=left 
    [ search index=B earliest=-1d@d groupentitlements!=None 
    | eval Username=upper(Username) 
    | rename Username as USERID, GivenName as FIRST_NAME, Surname as LAST_NAME, groupentitlements as ENTITLEMENT, HomeDirectory as HOME_DIRECTORY 
    | join USERID type=left 
        [ search index=C earliest=-1d@d USERID 
        | dedup USERID 
        | eval USERID=upper(USERID) ] ] 
| table HOST USERID FIRST_NAME LAST_NAME LOGIN_FAILURES HOME_DIRECTORY TITLE ASSOCIATE PRIORITY_CUSTOMER ORGANIZATION_CODE CSS_BUSINESS_GROUP ENTITLEMENT BUILDING_NAME ADDRESS_LINE1 CITY STATE_CD COUNTRY 
| sort - LOGIN_FAILURES
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I changed the type of join to left, it seems to be "full" join in the query, which I dont think is a valid option&lt;/P&gt;

&lt;P&gt;as referring to &lt;A href="https://docs.splunk.com/Documentation/Splunk/7.2.6/SearchReference/Join"&gt;https://docs.splunk.com/Documentation/Splunk/7.2.6/SearchReference/Join&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;the options are:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;type=(inner | outer | left) 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;please let me know if this doesn't help&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jun 2019 19:12:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-am-trying-to-combine-three-indexes-using-left-join-but-not-all/m-p/397769#M170930</guid>
      <dc:creator>martinpu</dc:creator>
      <dc:date>2019-06-03T19:12:29Z</dc:date>
    </item>
  </channel>
</rss>

