<?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: Populate an event with data from another event in Knowledge Management</title>
    <link>https://community.splunk.com/t5/Knowledge-Management/How-can-I-populate-an-event-with-data-from-another-event/m-p/617779#M9066</link>
    <description>&lt;P&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;The Data is in use for Identity management , I was hoping to get a logic that I can further modify and implement with my actual data.&lt;/P&gt;</description>
    <pubDate>Thu, 20 Oct 2022 02:16:52 GMT</pubDate>
    <dc:creator>AbhishekJ</dc:creator>
    <dc:date>2022-10-20T02:16:52Z</dc:date>
    <item>
      <title>How can I populate an event with data from another event?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/How-can-I-populate-an-event-with-data-from-another-event/m-p/617774#M9063</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;I have set of events from an index with user details as below and I am looking to populate the events with there manager Name .&lt;/P&gt;
&lt;TABLE border="1"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;ID&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;Name&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;MgrID&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;1&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;Tom&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;4&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;2&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;Rick&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;3&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;Harry&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;4&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;Boss&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;5&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;5&lt;/TD&gt;
&lt;TD&gt;CEO&lt;/TD&gt;
&lt;TD&gt;5&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to add another column to the result with MgrName like below using the MgrID and re-referencing the same index again:&lt;/P&gt;
&lt;TABLE border="1" width="199px"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="51.375px"&gt;ID&lt;/TD&gt;
&lt;TD width="53.05357px"&gt;Name&lt;/TD&gt;
&lt;TD width="54px"&gt;MgrID&lt;/TD&gt;
&lt;TD width="40px"&gt;MgrName&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="51.375px"&gt;1&lt;/TD&gt;
&lt;TD width="53.05357px"&gt;Tom&lt;/TD&gt;
&lt;TD width="54px"&gt;4&lt;/TD&gt;
&lt;TD width="40px"&gt;Boss&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="51.375px"&gt;2&lt;/TD&gt;
&lt;TD width="53.05357px"&gt;Rick&lt;/TD&gt;
&lt;TD width="54px"&gt;1&lt;/TD&gt;
&lt;TD width="40px"&gt;Tom&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="51.375px"&gt;3&lt;/TD&gt;
&lt;TD width="53.05357px"&gt;Harry&lt;/TD&gt;
&lt;TD width="54px"&gt;1&lt;/TD&gt;
&lt;TD width="40px"&gt;Tom&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="51.375px"&gt;4&lt;/TD&gt;
&lt;TD width="53.05357px"&gt;Boss&lt;/TD&gt;
&lt;TD width="54px"&gt;5&lt;/TD&gt;
&lt;TD width="40px"&gt;CEO&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;5&lt;/TD&gt;
&lt;TD&gt;CEO&lt;/TD&gt;
&lt;TD&gt;5&lt;/TD&gt;
&lt;TD&gt;CEO&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tried to come up with something and so far no luck, appreciate if someone has any suggestions or have done this before.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 14:18:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/How-can-I-populate-an-event-with-data-from-another-event/m-p/617774#M9063</guid>
      <dc:creator>AbhishekJ</dc:creator>
      <dc:date>2022-10-20T14:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: Populate an event with data from another event</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/How-can-I-populate-an-event-with-data-from-another-event/m-p/617776#M9064</link>
      <description>&lt;P&gt;Where does that manager name data exist?&lt;/P&gt;&lt;P&gt;Simple way to do it is via a lookup, where you have two fields, name and manager name and then use lookup to lookup the name and return the manager name.&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/9.0.1/SearchReference/Lookup" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/9.0.1/SearchReference/Lookup&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 01:30:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/How-can-I-populate-an-event-with-data-from-another-event/m-p/617776#M9064</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-10-20T01:30:24Z</dc:date>
    </item>
    <item>
      <title>Re: Populate an event with data from another event</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/How-can-I-populate-an-event-with-data-from-another-event/m-p/617778#M9065</link>
      <description>&lt;P&gt;Could you provide the actual fieldnames of&amp;nbsp;ID, Name, and MgrID or confirm that it's already the case?&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 01:56:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/How-can-I-populate-an-event-with-data-from-another-event/m-p/617778#M9065</guid>
      <dc:creator>johnhuang</dc:creator>
      <dc:date>2022-10-20T01:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: Populate an event with data from another event</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/How-can-I-populate-an-event-with-data-from-another-event/m-p/617779#M9066</link>
      <description>&lt;P&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;The Data is in use for Identity management , I was hoping to get a logic that I can further modify and implement with my actual data.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 02:16:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/How-can-I-populate-an-event-with-data-from-another-event/m-p/617779#M9066</guid>
      <dc:creator>AbhishekJ</dc:creator>
      <dc:date>2022-10-20T02:16:52Z</dc:date>
    </item>
    <item>
      <title>Re: Populate an event with data from another event</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/How-can-I-populate-an-event-with-data-from-another-event/m-p/617780#M9067</link>
      <description>&lt;P&gt;The data is the same , I need to populate the results from this index by requiring it.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;ID is the unique field and since the primary data contains the ID of the Manager, I need to populate the final results with Mgr Name by utilising the Mgr ID.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 02:19:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/How-can-I-populate-an-event-with-data-from-another-event/m-p/617780#M9067</guid>
      <dc:creator>AbhishekJ</dc:creator>
      <dc:date>2022-10-20T02:19:03Z</dc:date>
    </item>
    <item>
      <title>Re: Populate an event with data from another event</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/How-can-I-populate-an-event-with-data-from-another-event/m-p/617782#M9068</link>
      <description>&lt;P&gt;So, do you have the manager name and ID anywhere in Splunk?&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 02:33:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/How-can-I-populate-an-event-with-data-from-another-event/m-p/617782#M9068</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-10-20T02:33:51Z</dc:date>
    </item>
    <item>
      <title>Re: Populate an event with data from another event</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/How-can-I-populate-an-event-with-data-from-another-event/m-p/617783#M9069</link>
      <description>&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;1. Run once (initially) to create the intial lookup file:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;base_search&amp;gt; earliest=1mon@mon
| dedup ID
| table ID Name MgrID
| outputlookup identity_lookup.csv&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;2. Run this on a schedule (hourly, daily, etc, depending on need) to populate the lookup file with manager name and keep it up to date with identity changes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;base_search&amp;gt; earliest=-1d
| append [| inputlookup identity_lookup.csv]
| lookup identity_lookup.csv ID AS MgrID OUTPUT Name AS MgrName
| dedup ID
| outputlookup identity_lookup.csv&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. Once the lookup have been populate, you can use lookup against existing data:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;-- Resolve MgrName based on ID
| lookup identity_lookup.csv ID OUTPUT Name MgrID MgrName

-- Resolve MgrName based on Name
| lookup identity_lookup.csv Name OUTPUT MgrName&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 03:18:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/How-can-I-populate-an-event-with-data-from-another-event/m-p/617783#M9069</guid>
      <dc:creator>johnhuang</dc:creator>
      <dc:date>2022-10-20T03:18:57Z</dc:date>
    </item>
    <item>
      <title>Re: Populate an event with data from another event</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/How-can-I-populate-an-event-with-data-from-another-event/m-p/617785#M9070</link>
      <description>&lt;P&gt;Thanks, its in the same index , was trying to see if there was a way I could use something like subsearches/macros/join or some other way to produce required result in a single SPL:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;ID&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;Name&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;MgrID&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;1&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;Tom&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;2&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;Rick&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;3&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;Harry&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;4&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;Boss&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;CEO&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Thu, 20 Oct 2022 03:55:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/How-can-I-populate-an-event-with-data-from-another-event/m-p/617785#M9070</guid>
      <dc:creator>AbhishekJ</dc:creator>
      <dc:date>2022-10-20T03:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: Populate an event with data from another event</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/How-can-I-populate-an-event-with-data-from-another-event/m-p/617786#M9071</link>
      <description>&lt;P&gt;Thanks, using lookups does make sense, may be I would use a KV Store as I am handling 300000 entries. I will give it a try in Dev env to see how it works out and confirm.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Any suggestions, if this could this be done with using Subsearch/join/appendcols/macros somehow.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 03:53:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/How-can-I-populate-an-event-with-data-from-another-event/m-p/617786#M9071</guid>
      <dc:creator>AbhishekJ</dc:creator>
      <dc:date>2022-10-20T03:53:06Z</dc:date>
    </item>
    <item>
      <title>Re: Populate an event with data from another event</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/How-can-I-populate-an-event-with-data-from-another-event/m-p/617787#M9072</link>
      <description>&lt;P&gt;300K entries should not be an issue for a CSV lookup -- worth testing before moving to kvstore.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 04:34:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/How-can-I-populate-an-event-with-data-from-another-event/m-p/617787#M9072</guid>
      <dc:creator>johnhuang</dc:creator>
      <dc:date>2022-10-20T04:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: Populate an event with data from another event</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/How-can-I-populate-an-event-with-data-from-another-event/m-p/617805#M9073</link>
      <description>&lt;P&gt;join version (please check the performance):&lt;/P&gt;&lt;LI-CODE lang="css"&gt;&amp;lt;base search for user&amp;gt; 
|join type=outer left=L right=R where L.MgrID = R.ID [search &amp;lt;sub-search for managers&amp;gt;]&lt;/LI-CODE&gt;&lt;P&gt;`type=outer` to get results even if no manager was found.&lt;/P&gt;&lt;P&gt;Note: If you are going to use custom time ranges in base query ('earliest', 'latest') - these filters are not applied to sub-search, so be careful there. Probably you want to add the same time range criteria to the sub-search&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 10:00:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/How-can-I-populate-an-event-with-data-from-another-event/m-p/617805#M9073</guid>
      <dc:creator>wmazur-splunk</dc:creator>
      <dc:date>2022-10-20T10:00:15Z</dc:date>
    </item>
    <item>
      <title>Re: Populate an event with data from another event</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/How-can-I-populate-an-event-with-data-from-another-event/m-p/617808#M9074</link>
      <description>&lt;P&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;tried like below &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; , but didn't work &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=my_data
|eval ChkMgrID=MgrID 
|join type=outer left=L right=R where L.ChkMgrID = R.ID 
[search index=my_data | eval MgrName=Name | table MgrName]
| table ID Name MgrID MgrName&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Time range last 24 hours , reading about join as well .&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 10:19:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/How-can-I-populate-an-event-with-data-from-another-event/m-p/617808#M9074</guid>
      <dc:creator>AbhishekJ</dc:creator>
      <dc:date>2022-10-20T10:19:47Z</dc:date>
    </item>
    <item>
      <title>Re: Populate an event with data from another event</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/How-can-I-populate-an-event-with-data-from-another-event/m-p/617811#M9075</link>
      <description>&lt;P&gt;Sub-search:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| table ID, MgrName&lt;/LI-CODE&gt;&lt;P&gt;Hint: Depending on event size:&amp;nbsp; drop this part of the search or replace with&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; | fields ID, MgrName &lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 20 Oct 2022 10:38:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/How-can-I-populate-an-event-with-data-from-another-event/m-p/617811#M9075</guid>
      <dc:creator>wmazur-splunk</dc:creator>
      <dc:date>2022-10-20T10:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: Populate an event with data from another event</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/How-can-I-populate-an-event-with-data-from-another-event/m-p/617924#M9081</link>
      <description>&lt;P&gt;Thanks, this works like the way I was hoping it for:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=my_data
|eval ChkMgrID=MgrID 
|join type=outer left=L right=R where L.ChkMgrID = R.ID 
[search index=my_data | eval MgrName=Name | fields ID MgrName]
| table L.ID L.Name L.MgrID R.MgrName&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;I would further modify it to get 3 levels of leadership in the organisation, but this is something I was looking for.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 22:28:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/How-can-I-populate-an-event-with-data-from-another-event/m-p/617924#M9081</guid>
      <dc:creator>AbhishekJ</dc:creator>
      <dc:date>2022-10-20T22:28:10Z</dc:date>
    </item>
  </channel>
</rss>

