<?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 compare 2 lookups contents in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/compare-2-lookups-contents/m-p/750711#M22747</link>
    <description>&lt;P&gt;Hi, any support please.&lt;/P&gt;&lt;P&gt;I have 2 lookups.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;tmp1_1.csv&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;WorkplaceId,PK1,Description,Contract&lt;/STRONG&gt;&lt;BR /&gt;1234567890,7535712,Contract1,19&lt;BR /&gt;1123456789,7535712,Contract2,18&lt;BR /&gt;1234567890,7456072,Contract3,14&lt;BR /&gt;1234567890,7456072,Contract4,15&lt;BR /&gt;1234567891,7456072,Contract5,16&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;tmp1_2.csv&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;WorkplaceId,State,Timestamp,ContractId&lt;/STRONG&gt;&lt;BR /&gt;1234567890,Start,1752838050,12&lt;BR /&gt;1234567890,End,1752838633,12&lt;BR /&gt;1123456789,Start,1752838853,13&lt;BR /&gt;1123456789,Break,1752839380,13&lt;BR /&gt;1123456789,End,1752839691,13&lt;BR /&gt;1234567890,Start,1752839720,14&lt;BR /&gt;1234567890,Start,1752839745,15&lt;BR /&gt;1234567891,Start,1752839777,16&lt;BR /&gt;1234567891,Start,1752839790,18&lt;BR /&gt;1234567890,Start,1752839892,19&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The primary key between these tables is&lt;BR /&gt;WorkplaceId,Contract=WorkplaceId,ContractId&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The task is always to select the content from&amp;nbsp;tmp1_2.csv based on conditions&lt;/SPAN&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN&gt;cond1: select everything from&amp;nbsp;tmp1_2.csv where&amp;nbsp;WorkplaceId,Contract!=WorkplaceId,ContractId. In this case the result should be&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;WorkplaceId,State,Timestamp,ContractId&lt;/STRONG&gt;&lt;BR /&gt;1234567890,Start,1752838050,12&lt;BR /&gt;1234567890,End,1752838633,12&lt;BR /&gt;1123456789,Start,1752838853,13&lt;BR /&gt;1123456789,Break,1752839380,13&lt;BR /&gt;1123456789,End,1752839691,13&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2. cond2: select everything from&amp;nbsp;tmp1_2.csv where&amp;nbsp;WorkplaceId,Contract=WorkplaceId,ContractId. In this case the result should be&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;WorkplaceId,State,Timestamp,ContractId&lt;/STRONG&gt;&lt;BR /&gt;1234567890,Start,1752839720,14&lt;BR /&gt;1234567890,Start,1752839745,15&lt;BR /&gt;1234567891,Start,1752839777,16&lt;BR /&gt;1234567891,Start,1752839790,18&lt;BR /&gt;1234567890,Start,1752839892,19&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Any support, please?&lt;/P&gt;</description>
    <pubDate>Wed, 30 Jul 2025 07:01:02 GMT</pubDate>
    <dc:creator>spisiakmi</dc:creator>
    <dc:date>2025-07-30T07:01:02Z</dc:date>
    <item>
      <title>compare 2 lookups contents</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/compare-2-lookups-contents/m-p/750711#M22747</link>
      <description>&lt;P&gt;Hi, any support please.&lt;/P&gt;&lt;P&gt;I have 2 lookups.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;tmp1_1.csv&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;WorkplaceId,PK1,Description,Contract&lt;/STRONG&gt;&lt;BR /&gt;1234567890,7535712,Contract1,19&lt;BR /&gt;1123456789,7535712,Contract2,18&lt;BR /&gt;1234567890,7456072,Contract3,14&lt;BR /&gt;1234567890,7456072,Contract4,15&lt;BR /&gt;1234567891,7456072,Contract5,16&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;tmp1_2.csv&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;WorkplaceId,State,Timestamp,ContractId&lt;/STRONG&gt;&lt;BR /&gt;1234567890,Start,1752838050,12&lt;BR /&gt;1234567890,End,1752838633,12&lt;BR /&gt;1123456789,Start,1752838853,13&lt;BR /&gt;1123456789,Break,1752839380,13&lt;BR /&gt;1123456789,End,1752839691,13&lt;BR /&gt;1234567890,Start,1752839720,14&lt;BR /&gt;1234567890,Start,1752839745,15&lt;BR /&gt;1234567891,Start,1752839777,16&lt;BR /&gt;1234567891,Start,1752839790,18&lt;BR /&gt;1234567890,Start,1752839892,19&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The primary key between these tables is&lt;BR /&gt;WorkplaceId,Contract=WorkplaceId,ContractId&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The task is always to select the content from&amp;nbsp;tmp1_2.csv based on conditions&lt;/SPAN&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN&gt;cond1: select everything from&amp;nbsp;tmp1_2.csv where&amp;nbsp;WorkplaceId,Contract!=WorkplaceId,ContractId. In this case the result should be&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;WorkplaceId,State,Timestamp,ContractId&lt;/STRONG&gt;&lt;BR /&gt;1234567890,Start,1752838050,12&lt;BR /&gt;1234567890,End,1752838633,12&lt;BR /&gt;1123456789,Start,1752838853,13&lt;BR /&gt;1123456789,Break,1752839380,13&lt;BR /&gt;1123456789,End,1752839691,13&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2. cond2: select everything from&amp;nbsp;tmp1_2.csv where&amp;nbsp;WorkplaceId,Contract=WorkplaceId,ContractId. In this case the result should be&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;WorkplaceId,State,Timestamp,ContractId&lt;/STRONG&gt;&lt;BR /&gt;1234567890,Start,1752839720,14&lt;BR /&gt;1234567890,Start,1752839745,15&lt;BR /&gt;1234567891,Start,1752839777,16&lt;BR /&gt;1234567891,Start,1752839790,18&lt;BR /&gt;1234567890,Start,1752839892,19&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Any support, please?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jul 2025 07:01:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/compare-2-lookups-contents/m-p/750711#M22747</guid>
      <dc:creator>spisiakmi</dc:creator>
      <dc:date>2025-07-30T07:01:02Z</dc:date>
    </item>
    <item>
      <title>Re: compare 2 lookups contents</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/compare-2-lookups-contents/m-p/750720#M22749</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/189417"&gt;@spisiakmi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You want 2 different searches for your conditions like below?&lt;/P&gt;&lt;P&gt;Condition 1: Select rows from tmp1_2.csv where (WorkplaceId,ContractId) is NOT present in tmp1_1.csv as (WorkplaceId,Contract)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup tmp1_2.csv
| eval key=WorkplaceId."-".ContractId
| lookup tmp1_1.csv WorkplaceId as WorkplaceId, Contract as ContractId OUTPUT PK1
| where isnull(PK1)
| table WorkplaceId, State, Timestamp, ContractId&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Condition 2: Select rows from tmp1_2.csv where (WorkplaceId,ContractId) is present in tmp1_1.csv as (WorkplaceId,Contract)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup tmp1_2.csv
| eval key=WorkplaceId."-".ContractId
| lookup tmp1_1.csv WorkplaceId as WorkplaceId, Contract as ContractId OUTPUT PK1
| where isnotnull(PK1)
| table WorkplaceId, State, Timestamp, ContractId&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Prewin&lt;BR /&gt;Splunk Enthusiast | Always happy to help! If this answer helped you, please consider marking it as the solution or giving a Karma. Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jul 2025 08:24:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/compare-2-lookups-contents/m-p/750720#M22749</guid>
      <dc:creator>PrewinThomas</dc:creator>
      <dc:date>2025-07-30T08:24:53Z</dc:date>
    </item>
    <item>
      <title>Re: compare 2 lookups contents</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/compare-2-lookups-contents/m-p/750728#M22751</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN class=""&gt;&lt;A class="" href="https://community.splunk.com/t5/user/viewprofilepage/user-id/28010" target="_self"&gt;&lt;SPAN class=""&gt;PrewinThomas&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;thank you very much. Works fantastic.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jul 2025 09:07:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/compare-2-lookups-contents/m-p/750728#M22751</guid>
      <dc:creator>spisiakmi</dc:creator>
      <dc:date>2025-07-30T09:07:19Z</dc:date>
    </item>
  </channel>
</rss>

