<?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: Join two indexes with the same field data in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Join-two-indexes-with-the-same-field-data/m-p/697622#M236960</link>
    <description>&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="20%" height="24px"&gt;user&lt;/TD&gt;&lt;TD width="20%" height="24px"&gt;bunit&lt;/TD&gt;&lt;TD width="20%" height="24px"&gt;gemini&lt;/TD&gt;&lt;TD width="20%" height="24px"&gt;perplexity&lt;/TD&gt;&lt;TD width="20%" height="24px"&gt;openai&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20%" height="24px"&gt;user1@mail.com&lt;/TD&gt;&lt;TD width="20%" height="24px"&gt;HR&lt;/TD&gt;&lt;TD width="20%" height="24px"&gt;1&lt;/TD&gt;&lt;TD width="20%" height="24px"&gt;1&lt;/TD&gt;&lt;TD width="20%" height="24px"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20%" height="24px"&gt;user2@mail.com&lt;/TD&gt;&lt;TD width="20%" height="24px"&gt;IT&lt;/TD&gt;&lt;TD width="20%" height="24px"&gt;0&lt;/TD&gt;&lt;TD width="20%" height="24px"&gt;1&lt;/TD&gt;&lt;TD width="20%" height="24px"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;This is the results that I am getting with the query without the bunit column which is what I want to add. So basically a join to see where the email=user (email is in index=&lt;SPAN&gt;collect_identities)&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 28 Aug 2024 15:05:25 GMT</pubDate>
    <dc:creator>JandrevdM</dc:creator>
    <dc:date>2024-08-28T15:05:25Z</dc:date>
    <item>
      <title>Join two indexes with the same field data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-two-indexes-with-the-same-field-data/m-p/697593#M236955</link>
      <description>&lt;P&gt;Good day, I have a query that I would like to add more information onto. The query pulls all users that accessed a AI site and gives my data for weekdays as a 1 or 0 if the site was accessed. The query 1 gets a user from index db_it_network and I would like to add the department of each user by querying theindex=collect_identities sourcetype=ldap:query The users are displayed in the collect identities index as 'email' and their department in the bunit field&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=db_it_network sourcetype=pan* url_domain="www.perplexity.ai" OR app=claude-base OR app=google-gemini* OR app=openai* OR app=bing-ai-base | where date_wday="monday" OR date_wday="tuesday" OR date_wday="wednesday" OR date_wday="thursday" OR date_wday="friday" | eval app=if(url_domain="www.perplexity.ai", url_domain, app) | table user, app, date_wday | stats count by user app date_wday | chart count by user app | sort app 0&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;Note: the |stats | chart is necessary to distinct so that one user return results for one app per day&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2024 13:37:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-two-indexes-with-the-same-field-data/m-p/697593#M236955</guid>
      <dc:creator>JandrevdM</dc:creator>
      <dc:date>2024-08-28T13:37:02Z</dc:date>
    </item>
    <item>
      <title>Re: Join two indexes with the same field data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-two-indexes-with-the-same-field-data/m-p/697600#M236957</link>
      <description>&lt;P&gt;It is not clear what you are trying to do here - after the chart command, the app field no longer exists so the sort is meaningless.&lt;/P&gt;&lt;P&gt;What are your expected results going to look like?&lt;/P&gt;&lt;P&gt;How do events in he collect_identities index relate to the events from the db_it_network index?&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2024 14:28:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-two-indexes-with-the-same-field-data/m-p/697600#M236957</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-08-28T14:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: Join two indexes with the same field data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-two-indexes-with-the-same-field-data/m-p/697622#M236960</link>
      <description>&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="20%" height="24px"&gt;user&lt;/TD&gt;&lt;TD width="20%" height="24px"&gt;bunit&lt;/TD&gt;&lt;TD width="20%" height="24px"&gt;gemini&lt;/TD&gt;&lt;TD width="20%" height="24px"&gt;perplexity&lt;/TD&gt;&lt;TD width="20%" height="24px"&gt;openai&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20%" height="24px"&gt;user1@mail.com&lt;/TD&gt;&lt;TD width="20%" height="24px"&gt;HR&lt;/TD&gt;&lt;TD width="20%" height="24px"&gt;1&lt;/TD&gt;&lt;TD width="20%" height="24px"&gt;1&lt;/TD&gt;&lt;TD width="20%" height="24px"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20%" height="24px"&gt;user2@mail.com&lt;/TD&gt;&lt;TD width="20%" height="24px"&gt;IT&lt;/TD&gt;&lt;TD width="20%" height="24px"&gt;0&lt;/TD&gt;&lt;TD width="20%" height="24px"&gt;1&lt;/TD&gt;&lt;TD width="20%" height="24px"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;This is the results that I am getting with the query without the bunit column which is what I want to add. So basically a join to see where the email=user (email is in index=&lt;SPAN&gt;collect_identities)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2024 15:05:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-two-indexes-with-the-same-field-data/m-p/697622#M236960</guid>
      <dc:creator>JandrevdM</dc:creator>
      <dc:date>2024-08-28T15:05:25Z</dc:date>
    </item>
    <item>
      <title>Re: Join two indexes with the same field data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-two-indexes-with-the-same-field-data/m-p/697624#M236961</link>
      <description>&lt;P&gt;Try something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=db_it_network sourcetype=pan* url_domain="www.perplexity.ai" OR app=claude-base OR app=google-gemini* OR app=openai* OR app=bing-ai-base | where date_wday="monday" OR date_wday="tuesday" OR date_wday="wednesday" OR date_wday="thursday" OR date_wday="friday" | eval app=if(url_domain="www.perplexity.ai", url_domain, app) | table user, app, date_wday | stats count by user app date_wday | chart count by user app
| join type=left user [search index=collect_identities | rename email as user | table user bunit]&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 28 Aug 2024 15:11:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-two-indexes-with-the-same-field-data/m-p/697624#M236961</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-08-28T15:11:55Z</dc:date>
    </item>
  </channel>
</rss>

