<?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: Creating Lookup table from another dynamic Lookup table in Knowledge Management</title>
    <link>https://community.splunk.com/t5/Knowledge-Management/Creating-Lookup-table-from-another-dynamic-Lookup-table/m-p/521043#M4736</link>
    <description>&lt;P&gt;Would this work?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup lookup_table_1.csv
| lookup lookup_table_2.csv
| append [| inputlookup lookup_table_2.csv ] | dedup Id | outputlookup lookup_table_2.csv&lt;/LI-CODE&gt;&lt;P&gt;Essentially, add the extra fields for "known" Ids, then add all the known rows (in case some are missing from table 1), dedup the rows and write away&lt;/P&gt;</description>
    <pubDate>Wed, 23 Sep 2020 12:22:33 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2020-09-23T12:22:33Z</dc:date>
    <item>
      <title>Creating Lookup table from another dynamic Lookup table</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Creating-Lookup-table-from-another-dynamic-Lookup-table/m-p/521036#M4735</link>
      <description>&lt;P&gt;Hi Splunkers!&lt;BR /&gt;&lt;BR /&gt;I have a Lookup table (&lt;STRONG&gt;lookup_table_1&lt;/STRONG&gt;) that pulls external CSV data periodically and updates itself (script). I need to add a couple of columns that I could update manually along with the data that is automatic updated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was thinking creating another lookup (&lt;STRONG&gt;lookup_table_2&lt;/STRONG&gt;) that is generated by querying (&lt;STRONG&gt;lookup_table_1&lt;/STRONG&gt;) and adding 2 extra columns (given&amp;nbsp;&lt;STRONG&gt;lookup_table_2 &lt;/STRONG&gt;already has fields a, b, c, d, e created):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup lookup_table_1.csv
| append [| inputlookup lookup_table_2.csv ] | dedup Id | outputlookup lookup_table_2.csv&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, this removes values from manual fields (d, e).&lt;STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;lookup_table_1 - (dynamic)&lt;/STRONG&gt;&lt;BR /&gt;|&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;field A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;field B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; field C&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&lt;BR /&gt;| dynamic_value | dynamic_value | dynamic_value |&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;lookup_table_2 - (dynamic+2x manual fields(DF))&lt;BR /&gt;&lt;/STRONG&gt;|&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;field A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;field B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; field C&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; field D&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;field E&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&lt;BR /&gt;| dynamic_value | dynamic_value | dynamic_value |&amp;nbsp; &amp;nbsp; &amp;nbsp; static_value&amp;nbsp; &amp;nbsp;|&amp;nbsp; &amp;nbsp; static_value |&lt;BR /&gt;&lt;BR /&gt;Is there a way to have dynamic lookup that would update periodically, but preserving 2 manual columns that I could update manually without compromising them each time lookup updates itself?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance!&lt;BR /&gt;Regards&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2020 12:03:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Creating-Lookup-table-from-another-dynamic-Lookup-table/m-p/521036#M4735</guid>
      <dc:creator>Splunk1ngSpree</dc:creator>
      <dc:date>2020-09-23T12:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Lookup table from another dynamic Lookup table</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Creating-Lookup-table-from-another-dynamic-Lookup-table/m-p/521043#M4736</link>
      <description>&lt;P&gt;Would this work?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup lookup_table_1.csv
| lookup lookup_table_2.csv
| append [| inputlookup lookup_table_2.csv ] | dedup Id | outputlookup lookup_table_2.csv&lt;/LI-CODE&gt;&lt;P&gt;Essentially, add the extra fields for "known" Ids, then add all the known rows (in case some are missing from table 1), dedup the rows and write away&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2020 12:22:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Creating-Lookup-table-from-another-dynamic-Lookup-table/m-p/521043#M4736</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-09-23T12:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Lookup table from another dynamic Lookup table</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Creating-Lookup-table-from-another-dynamic-Lookup-table/m-p/521062#M4737</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;, I added all dynamic fields to the &lt;STRONG&gt;lookup&amp;nbsp;&lt;/STRONG&gt;command:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup lookup_table_1.csv
| lookup lookup_table_2.csv field_a, field_b, field_c
| append [| inputlookup lookup_table_2.csv ] | dedup Id | outputlookup lookup_table_2.csv&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;This does work appending new rows from lookup_1 to lookup_2, and preserving static fields. However if a row is removed from lookup_1 it does not remove it from lookup_2. Is there a way to&amp;nbsp;&lt;STRONG&gt;replace&amp;nbsp;&lt;/STRONG&gt;all dynamic data from lookup_1 in lookup_to instead of only appending new (but not removing from lookup_2 if removed from lookup_1).&lt;BR /&gt;&lt;BR /&gt;Thanks! Half way there &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2020 13:35:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Creating-Lookup-table-from-another-dynamic-Lookup-table/m-p/521062#M4737</guid>
      <dc:creator>Splunk1ngSpree</dc:creator>
      <dc:date>2020-09-23T13:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Lookup table from another dynamic Lookup table</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Creating-Lookup-table-from-another-dynamic-Lookup-table/m-p/521068#M4738</link>
      <description>&lt;P&gt;I am not sure I understand what you are asking for - what do you mean by replacing the dynamic data? If you don't want the data that is in table 2 unless it has corresponding data in table 1, then don't append table 2. There is also a dedup by Id, is this one of the match fields?&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2020 13:52:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Creating-Lookup-table-from-another-dynamic-Lookup-table/m-p/521068#M4738</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-09-23T13:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Lookup table from another dynamic Lookup table</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Creating-Lookup-table-from-another-dynamic-Lookup-table/m-p/521077#M4739</link>
      <description>&lt;P&gt;Basically, &lt;STRONG&gt;lookup_1&lt;/STRONG&gt; is constantly changing, new rows are added and removed. If a new row is added to&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;lookup_1&lt;/STRONG&gt;&amp;nbsp; (ID will ALWAYS have a unique ID), the search will add it to the &lt;STRONG&gt;lookup_2.&lt;BR /&gt;&lt;/STRONG&gt;The problem is when row is removed from&amp;nbsp;&lt;STRONG&gt;lookup_1, &lt;/STRONG&gt;the above search will NOT remove that "old" row from&amp;nbsp;&lt;STRONG&gt;lookup_2 &lt;/STRONG&gt;that&lt;STRONG&gt; is NOT&amp;nbsp;&lt;/STRONG&gt;existing in&lt;STRONG&gt;&amp;nbsp;inlookup_1 &lt;/STRONG&gt;anymore&lt;STRONG&gt;.&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;Example of the problem:&lt;BR /&gt;&lt;BR /&gt;1.&lt;STRONG&gt; lookup_1&amp;nbsp;&lt;/STRONG&gt;has been updated with 10 rows, above search runs and updates&amp;nbsp;&lt;STRONG&gt;lookup_2 &lt;/STRONG&gt;which now has 10 rows also.&lt;BR /&gt;2. When, a row is removed from&amp;nbsp;&lt;STRONG&gt;lookup_1,&amp;nbsp;&lt;/STRONG&gt;now having 9 rows. Search will run and update&amp;nbsp;&lt;STRONG&gt;lookup_2,&amp;nbsp;&lt;/STRONG&gt;which will have all 9 "new" rows from &lt;STRONG&gt;lookup_1&lt;/STRONG&gt;, but +1 OLD row from previous&amp;nbsp;&lt;STRONG&gt;lookup_1&amp;nbsp;&lt;/STRONG&gt;version.&lt;BR /&gt;&lt;BR /&gt;Search is only appending new rows from&amp;nbsp;&lt;STRONG&gt;lookup_1&lt;/STRONG&gt; to&amp;nbsp;&lt;STRONG&gt;lookup_2&lt;/STRONG&gt;, but not removing from&amp;nbsp;&lt;STRONG&gt;lookup_2 &lt;/STRONG&gt;if removed from&amp;nbsp;&lt;STRONG&gt;lookup_1.&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;Hope that explains it better &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2020 15:43:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Creating-Lookup-table-from-another-dynamic-Lookup-table/m-p/521077#M4739</guid>
      <dc:creator>Splunk1ngSpree</dc:creator>
      <dc:date>2020-09-23T15:43:38Z</dc:date>
    </item>
  </channel>
</rss>

