<?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 Matching fields from 3 different sources? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Matching-fields-from-3-different-sources/m-p/627241#M217958</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;Could some please help me with this query. I have 3 different sources from which i want to match the fields. I am&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Source A contains K_user, ID&lt;/P&gt;
&lt;P&gt;Source B contains RECID, USER_RESET&lt;/P&gt;
&lt;P&gt;Source C contains USER, NAME&lt;/P&gt;
&lt;P&gt;i have do the query in 2 steps&lt;/P&gt;
&lt;P&gt;1.&amp;nbsp; Join A and B using ID. (RECID=ID) and get USER_RESET&lt;/P&gt;
&lt;P&gt;2. Join the result from step 1 with C. Match K_USER and USER_RESET to get the name from source C.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if i explain using example&lt;/P&gt;
&lt;P&gt;Source A&lt;/P&gt;
&lt;P&gt;K_USER&amp;nbsp; ID&lt;/P&gt;
&lt;P&gt;ABN&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/P&gt;
&lt;P&gt;XYZ&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Source B&lt;/P&gt;
&lt;P&gt;RECID&amp;nbsp; &amp;nbsp;USER_RESET&lt;/P&gt;
&lt;P&gt;1.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MNP&lt;/P&gt;
&lt;P&gt;3.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;IJK&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SOURCE C&lt;/P&gt;
&lt;P&gt;USER&amp;nbsp; NAME&lt;/P&gt;
&lt;P&gt;ABN&amp;nbsp; John&lt;/P&gt;
&lt;P&gt;XYZ&amp;nbsp; &amp;nbsp;Mary&lt;/P&gt;
&lt;P&gt;MNP Philip&lt;/P&gt;
&lt;P&gt;IJK&amp;nbsp; Cathy&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Final result should look like&lt;/P&gt;
&lt;P&gt;K_USER | ID | USER_RESET | NAME(K_USER) | NAME(USER_RESET)&lt;/P&gt;
&lt;P&gt;ABN 1 MNP John Phillip&lt;/P&gt;
&lt;P&gt;Can i achieve&amp;nbsp; this without using join.&lt;/P&gt;
&lt;P&gt;Thanks in Advance!!&lt;/P&gt;</description>
    <pubDate>Tue, 17 Jan 2023 19:29:48 GMT</pubDate>
    <dc:creator>pratibha0610</dc:creator>
    <dc:date>2023-01-17T19:29:48Z</dc:date>
    <item>
      <title>Matching fields from 3 different sources?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Matching-fields-from-3-different-sources/m-p/627241#M217958</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;Could some please help me with this query. I have 3 different sources from which i want to match the fields. I am&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Source A contains K_user, ID&lt;/P&gt;
&lt;P&gt;Source B contains RECID, USER_RESET&lt;/P&gt;
&lt;P&gt;Source C contains USER, NAME&lt;/P&gt;
&lt;P&gt;i have do the query in 2 steps&lt;/P&gt;
&lt;P&gt;1.&amp;nbsp; Join A and B using ID. (RECID=ID) and get USER_RESET&lt;/P&gt;
&lt;P&gt;2. Join the result from step 1 with C. Match K_USER and USER_RESET to get the name from source C.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if i explain using example&lt;/P&gt;
&lt;P&gt;Source A&lt;/P&gt;
&lt;P&gt;K_USER&amp;nbsp; ID&lt;/P&gt;
&lt;P&gt;ABN&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/P&gt;
&lt;P&gt;XYZ&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Source B&lt;/P&gt;
&lt;P&gt;RECID&amp;nbsp; &amp;nbsp;USER_RESET&lt;/P&gt;
&lt;P&gt;1.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MNP&lt;/P&gt;
&lt;P&gt;3.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;IJK&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SOURCE C&lt;/P&gt;
&lt;P&gt;USER&amp;nbsp; NAME&lt;/P&gt;
&lt;P&gt;ABN&amp;nbsp; John&lt;/P&gt;
&lt;P&gt;XYZ&amp;nbsp; &amp;nbsp;Mary&lt;/P&gt;
&lt;P&gt;MNP Philip&lt;/P&gt;
&lt;P&gt;IJK&amp;nbsp; Cathy&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Final result should look like&lt;/P&gt;
&lt;P&gt;K_USER | ID | USER_RESET | NAME(K_USER) | NAME(USER_RESET)&lt;/P&gt;
&lt;P&gt;ABN 1 MNP John Phillip&lt;/P&gt;
&lt;P&gt;Can i achieve&amp;nbsp; this without using join.&lt;/P&gt;
&lt;P&gt;Thanks in Advance!!&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jan 2023 19:29:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Matching-fields-from-3-different-sources/m-p/627241#M217958</guid>
      <dc:creator>pratibha0610</dc:creator>
      <dc:date>2023-01-17T19:29:48Z</dc:date>
    </item>
    <item>
      <title>Re: matching fields from 3 different sources.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Matching-fields-from-3-different-sources/m-p/627245#M217959</link>
      <description>&lt;P&gt;Sure - just read all the sources at once (keeping track of which events came from which source), then use eventstats to join them&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval RECID=if(source="A", ID, RECID)
| eventstats values(USER_RESET) as USER_RESET by RECID
| eval USER=if(source="A", K_USER, USER)
| eventstats values(NAME) as NAME by USER
| where source="A" AND isnotnull(USER_RESET)&lt;/LI-CODE&gt;&lt;P&gt;Note that this works because all your fields have different names from your different sources. If you have the same names across sources, you may have to be a little more creative.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jan 2023 13:00:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Matching-fields-from-3-different-sources/m-p/627245#M217959</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-01-16T13:00:00Z</dc:date>
    </item>
  </channel>
</rss>

