<?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: &amp;quot;left join&amp;quot; lookup from CSV to an index in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/quot-left-join-quot-lookup-from-CSV-to-an-index/m-p/695365#M236457</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/254242"&gt;@LearningGuy&lt;/a&gt;&amp;nbsp;use inputlookup to grab the whole csv file into the search, then append the data from your index, then get common values using stats. E.g.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup host.csv
| rename ip_address as ip
| append [search index=owner | fields ip, owner]
| stats values(host) as host values(owner) as owner by ip&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 06 Aug 2024 03:42:36 GMT</pubDate>
    <dc:creator>KendallW</dc:creator>
    <dc:date>2024-08-06T03:42:36Z</dc:date>
    <item>
      <title>"left join" lookup from CSV to an index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/quot-left-join-quot-lookup-from-CSV-to-an-index/m-p/695364#M236456</link>
      <description>&lt;P&gt;&lt;BR /&gt;Is it possible to perform "left join" lookup from CSV to an index?&lt;BR /&gt;Usually lookup start with index, then CSV file and the result only produces the correlation (inner join)&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;index= owner
| lookup host.csv ip_address AS ip OUTPUTNEW host, owner&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but I am looking for left join that still retains all of the data in host.csv&lt;BR /&gt;&lt;BR /&gt;Thank you for your help&lt;BR /&gt;&lt;BR /&gt;Please see the example below:&lt;BR /&gt;&lt;BR /&gt;host.csv&lt;/P&gt;&lt;TABLE border="1" width="32.906478977630634%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="24.458701726643465%"&gt;&lt;STRONG&gt;ip_address&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="34.22222826604294%"&gt;&lt;STRONG&gt;host&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="24.458701726643465%"&gt;10.1.1.1&lt;/TD&gt;&lt;TD width="34.22222826604294%"&gt;host1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="24.458701726643465%"&gt;10.1.1.2&lt;/TD&gt;&lt;TD width="34.22222826604294%"&gt;host2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="24.458701726643465%"&gt;10.1.1.3&lt;/TD&gt;&lt;TD width="34.22222826604294%"&gt;host3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="24.458701726643465%"&gt;10.1.1.4&lt;/TD&gt;&lt;TD width="34.22222826604294%"&gt;host4&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;index=owner&lt;/STRONG&gt;&lt;/P&gt;&lt;TABLE border="1" width="347px"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="125.633px"&gt;&lt;STRONG&gt;ip&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="132.5px"&gt;&lt;STRONG&gt;host&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="87.8667px"&gt;&lt;STRONG&gt;owner&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="125.633px"&gt;10.1.1.3&lt;/TD&gt;&lt;TD width="132.5px"&gt;host3&lt;/TD&gt;&lt;TD width="87.8667px"&gt;owner3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="125.633px"&gt;10.1.1.4&lt;/TD&gt;&lt;TD width="132.5px"&gt;host4&lt;/TD&gt;&lt;TD width="87.8667px"&gt;owner4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="125.633px"&gt;10.1.1.5&lt;/TD&gt;&lt;TD width="132.5px"&gt;host5&lt;/TD&gt;&lt;TD width="87.8667px"&gt;owner5&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;left join "lookup" (expected output) - yellow and green circle (see drawing below)&lt;/STRONG&gt;&lt;/P&gt;&lt;TABLE border="1" width="340px"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="128.383px"&gt;&lt;STRONG&gt;ip_address&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="129.383px"&gt;&lt;STRONG&gt;host&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="81.2333px"&gt;&lt;STRONG&gt;owner&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="128.383px"&gt;10.1.1.1&lt;/TD&gt;&lt;TD width="129.383px"&gt;host1&lt;/TD&gt;&lt;TD width="81.2333px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="128.383px"&gt;10.1.1.2&lt;/TD&gt;&lt;TD width="129.383px"&gt;host2&lt;/TD&gt;&lt;TD width="81.2333px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="128.383px"&gt;10.1.1.3&lt;/TD&gt;&lt;TD width="129.383px"&gt;host3&lt;/TD&gt;&lt;TD width="81.2333px"&gt;owner3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="128.383px"&gt;10.1.1.4&lt;/TD&gt;&lt;TD width="129.383px"&gt;host4&lt;/TD&gt;&lt;TD width="81.2333px"&gt;owner4&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;normal "inner join" lookup&amp;nbsp;&amp;nbsp; index first, then CSV - green circle&lt;/STRONG&gt;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="128.383px"&gt;&lt;STRONG&gt;ip_address&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="129.383px"&gt;&lt;STRONG&gt;host&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="81.2333px"&gt;&lt;STRONG&gt;owner&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="128.383px"&gt;10.1.1.3&lt;/TD&gt;&lt;TD width="129.383px"&gt;host3&lt;/TD&gt;&lt;TD width="81.2333px"&gt;owner3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="128.383px"&gt;10.1.1.4&lt;/TD&gt;&lt;TD width="129.383px"&gt;host4&lt;/TD&gt;&lt;TD width="81.2333px"&gt;owner4&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LearningGuy_0-1722974764118.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/32086iF3D86B2F119B2CFF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LearningGuy_0-1722974764118.png" alt="LearningGuy_0-1722974764118.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2024 20:08:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/quot-left-join-quot-lookup-from-CSV-to-an-index/m-p/695364#M236456</guid>
      <dc:creator>LearningGuy</dc:creator>
      <dc:date>2024-08-06T20:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: "left join" lookup from CSV to an index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/quot-left-join-quot-lookup-from-CSV-to-an-index/m-p/695365#M236457</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/254242"&gt;@LearningGuy&lt;/a&gt;&amp;nbsp;use inputlookup to grab the whole csv file into the search, then append the data from your index, then get common values using stats. E.g.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup host.csv
| rename ip_address as ip
| append [search index=owner | fields ip, owner]
| stats values(host) as host values(owner) as owner by ip&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 06 Aug 2024 03:42:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/quot-left-join-quot-lookup-from-CSV-to-an-index/m-p/695365#M236457</guid>
      <dc:creator>KendallW</dc:creator>
      <dc:date>2024-08-06T03:42:36Z</dc:date>
    </item>
    <item>
      <title>Re: "left join" lookup from CSV to an index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/quot-left-join-quot-lookup-from-CSV-to-an-index/m-p/695366#M236458</link>
      <description>&lt;P&gt;Let me first say, that is an excellent description of the requirements. &amp;nbsp;Yes, you can do that with append.&lt;/P&gt;&lt;P&gt;Provided host and ip/ip_address match exactly, you can do&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=owner
| rename ip as ip_address
| append
  [inputlookup host.csv]
| stats values(owner) as owner by host ip_address&lt;/LI-CODE&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;Below is a full emulation you can play with&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults format=csv data="ip,	host,	owner
10.1.1.3,	host3,	owner3
10.1.1.4,	host4,	owner4
10.1.1.5,	host5,	owner5"
``` the above emulates
index=owner
```
| rename ip as ip_address
| append
    [makeresults format=csv data="ip_address,	host
10.1.1.1,	host1
10.1.1.2,	host2
10.1.1.3,	host3
10.1.1.4, 	host4"
    ``` the above emulates
    | inputlookup host.csv
    ```]
| stats values(owner) by ip_address host&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 06 Aug 2024 03:44:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/quot-left-join-quot-lookup-from-CSV-to-an-index/m-p/695366#M236458</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2024-08-06T03:44:12Z</dc:date>
    </item>
    <item>
      <title>Re: "left join" lookup from CSV to an index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/quot-left-join-quot-lookup-from-CSV-to-an-index/m-p/695455#M236480</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33901"&gt;@yuanliu&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks for your help. It's been a while since the last time I saw you, I hope you're doing fine.&lt;BR /&gt;&lt;BR /&gt;1)&amp;nbsp; I ran the emulation and the result included 10.1.1.5 from the index=owner (right join).&amp;nbsp; My expected output is host.csv plus the owner data from index=owner only if the IP matches.&amp;nbsp; (See below)&lt;BR /&gt;&lt;BR /&gt;2)&amp;nbsp; When I tested with real data (100k rows&amp;nbsp; CSV), the result reduced to 30k rows. I expected the left side as a baseline and the number of rows will remain the same.&amp;nbsp; &amp;nbsp;&lt;BR /&gt;Should I flip the logic?&amp;nbsp; &amp;nbsp;(inputlookup first, then append the index)&lt;BR /&gt;I actually tried to flip the logic, but after the append, the number of rows still doesn't match the CSV. (it's close)&lt;BR /&gt;&lt;BR /&gt;I appreciate your help. Thank you&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Emulation result&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LearningGuy_0-1722973847770.png" style="width: 585px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/32084i65CF3FAA507803CF/image-dimensions/585x133?v=v2" width="585" height="133" role="button" title="LearningGuy_0-1722973847770.png" alt="LearningGuy_0-1722973847770.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My expected output - yellow and green circle&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;TABLE border="1" width="340px"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="128.383px"&gt;&lt;STRONG&gt;ip_address&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="129.383px"&gt;&lt;STRONG&gt;host&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="81.2333px"&gt;&lt;STRONG&gt;owner&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="128.383px"&gt;10.1.1.1&lt;/TD&gt;&lt;TD width="129.383px"&gt;host1&lt;/TD&gt;&lt;TD width="81.2333px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="128.383px"&gt;10.1.1.2&lt;/TD&gt;&lt;TD width="129.383px"&gt;host2&lt;/TD&gt;&lt;TD width="81.2333px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="128.383px"&gt;10.1.1.3&lt;/TD&gt;&lt;TD width="129.383px"&gt;host3&lt;/TD&gt;&lt;TD width="81.2333px"&gt;owner3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="128.383px"&gt;10.1.1.4&lt;/TD&gt;&lt;TD width="129.383px"&gt;host4&lt;/TD&gt;&lt;TD width="81.2333px"&gt;owner4&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LearningGuy_1-1722974735855.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/32085iDFE301A7594E526C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LearningGuy_1-1722974735855.png" alt="LearningGuy_1-1722974735855.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2024 20:18:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/quot-left-join-quot-lookup-from-CSV-to-an-index/m-p/695455#M236480</guid>
      <dc:creator>LearningGuy</dc:creator>
      <dc:date>2024-08-06T20:18:46Z</dc:date>
    </item>
    <item>
      <title>Re: "left join" lookup from CSV to an index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/quot-left-join-quot-lookup-from-CSV-to-an-index/m-p/695457#M236481</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/121137"&gt;@KendallW&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I tried your suggestion with&amp;nbsp;&lt;SPAN&gt;real data (100k rows&amp;nbsp; CSV).&amp;nbsp; I expected the left side as a baseline and the number of rows will remain the same ,&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;but the number of rows doesn't match the CSV.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;In my initial example. My expected output is 4 rows, same number of rows in the host.CSV.&lt;BR /&gt;Please suggest.&amp;nbsp; I appreciate your help. Thank you.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG&gt;My expected output - yellow and green circle&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="1" width="340px"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="128.383px"&gt;&lt;STRONG&gt;ip_address&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="129.383px"&gt;&lt;STRONG&gt;host&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="81.2333px"&gt;&lt;STRONG&gt;owner&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="128.383px"&gt;10.1.1.1&lt;/TD&gt;&lt;TD width="129.383px"&gt;host1&lt;/TD&gt;&lt;TD width="81.2333px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="128.383px"&gt;10.1.1.2&lt;/TD&gt;&lt;TD width="129.383px"&gt;host2&lt;/TD&gt;&lt;TD width="81.2333px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="128.383px"&gt;10.1.1.3&lt;/TD&gt;&lt;TD width="129.383px"&gt;host3&lt;/TD&gt;&lt;TD width="81.2333px"&gt;owner3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="128.383px"&gt;10.1.1.4&lt;/TD&gt;&lt;TD width="129.383px"&gt;host4&lt;/TD&gt;&lt;TD width="81.2333px"&gt;owner4&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LearningGuy_0-1722975384163.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/32087i7E3F0570BC6D609C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LearningGuy_0-1722975384163.png" alt="LearningGuy_0-1722975384163.png" /&gt;&lt;/span&gt;&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;</description>
      <pubDate>Tue, 06 Aug 2024 20:19:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/quot-left-join-quot-lookup-from-CSV-to-an-index/m-p/695457#M236481</guid>
      <dc:creator>LearningGuy</dc:creator>
      <dc:date>2024-08-06T20:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: "left join" lookup from CSV to an index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/quot-left-join-quot-lookup-from-CSV-to-an-index/m-p/695470#M236485</link>
      <description>Hi&lt;BR /&gt;I think that this helps you&lt;BR /&gt;&lt;A href="https://community.splunk.com/t5/Splunk-Search/What-is-the-relation-between-the-Splunk-inner-left-join-and-the/m-p/391288/thread-id/113948" target="_blank"&gt;https://community.splunk.com/t5/Splunk-Search/What-is-the-relation-between-the-Splunk-inner-left-join-and-the/m-p/391288/thread-id/113948&lt;/A&gt;&lt;BR /&gt;In that answer there is define those joins and how you should do those in Splunk.&lt;BR /&gt;r Ismo</description>
      <pubDate>Tue, 06 Aug 2024 22:15:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/quot-left-join-quot-lookup-from-CSV-to-an-index/m-p/695470#M236485</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2024-08-06T22:15:06Z</dc:date>
    </item>
    <item>
      <title>Re: "left join" lookup from CSV to an index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/quot-left-join-quot-lookup-from-CSV-to-an-index/m-p/695495#M236490</link>
      <description>&lt;P&gt;Sorry I missed the definition here. &amp;nbsp;This is easily fixable&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=owner ``` where source != host.csv ```
| rename ip as ip_address
| append
  [inputlookup host.csv
  | eval source = "host.csv"]
| stats values(owner) as owner values(source) as source by host ip_address
| where source == "host.csv"
| fields - source&lt;/LI-CODE&gt;&lt;P&gt;Here, I am back at using the side effect of Splunk's multivalue equality.&lt;/P&gt;&lt;P&gt;Here is the full emulation&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults format=csv data="ip,	host,	owner
10.1.1.3,	host3,	owner3
10.1.1.4,	host4,	owner4
10.1.1.5,	host5,	owner5"
| eval source = "not-host.csv"
``` the above emulates
index=owner
```
| rename ip as ip_address
| append
    [makeresults format=csv data="ip_address,	host
10.1.1.1,	host1
10.1.1.2,	host2
10.1.1.3,	host3
10.1.1.4, 	host4"
    ``` the above emulates
    | inputlookup host.csv
    ```
    | eval source = "host.csv"]
| stats values(owner) as owner values(source) as source by ip_address host
| where source == "host.csv"
| fields - source&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2024 05:10:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/quot-left-join-quot-lookup-from-CSV-to-an-index/m-p/695495#M236490</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2024-08-07T05:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: "left join" lookup from CSV to an index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/quot-left-join-quot-lookup-from-CSV-to-an-index/m-p/695735#M236536</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33901"&gt;@yuanliu&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I tested and it worked fine for the sample. I accepted your suggestion as solution. Thank you for your help.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;1) Max 50k rows&lt;/STRONG&gt;&lt;BR /&gt;When I tested with the real data, I found out that the sub search CSV file is limited to 50k rows.&amp;nbsp; I need the CSV file as my baseline for left join, so if the file has 100k rows, then the expected result after left join is 100k rows (with additional column from index).&lt;BR /&gt;a) What do you suggest to fix this issue?&amp;nbsp; &amp;nbsp; (modifying limits.conf is not allowed)&lt;BR /&gt;b) Will splitting the CSV work?&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;2) Join command&lt;/STRONG&gt;&lt;BR /&gt;Do you think join command can work on my case?&lt;BR /&gt;&lt;BR /&gt;I tested it your solution using join in real data, but it always gave me the result as inner join, instead of left join,&amp;nbsp; although I already specified join type=left&lt;BR /&gt;In the solution you provided index will be treated as left data because it's specified first&lt;BR /&gt;How do I make the CSV as left data?&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I appreciate your help.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 17:49:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/quot-left-join-quot-lookup-from-CSV-to-an-index/m-p/695735#M236536</guid>
      <dc:creator>LearningGuy</dc:creator>
      <dc:date>2024-08-08T17:49:31Z</dc:date>
    </item>
    <item>
      <title>Re: "left join" lookup from CSV to an index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/quot-left-join-quot-lookup-from-CSV-to-an-index/m-p/695768#M236547</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;STRONG&gt;1) Max 50k rows&lt;/STRONG&gt;&lt;BR /&gt;b) Will splitting the CSV work?&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;It's unfortunate that you cannot change limits.conf. &amp;nbsp;Yes, splitting CSV will work. &amp;nbsp;If you don't need these CSVs as lookup, that's not a problem. &amp;nbsp;But if you still need a lookup, you will need to maintain two sets of CSVs, one for lookup, the rest for this purpose. (Alternatively, you can modify your searches to use multiple lookups. &amp;nbsp;At that point, you code can become unmaintainable.)&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;STRONG&gt;2) Join command&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;This is where things become intensely interesting&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt; &amp;nbsp;I did not compare your statements with the actual depiction. &amp;nbsp;After reviewing your original description, I notice that your depiction (and illustration) is a left join of CSV on the left, with index search on the right. &amp;nbsp;In this regard, Splunk's &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Join" target="_blank" rel="noopener"&gt;join&lt;/A&gt; is working exactly as documented.&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 host.csv
| join type=left ip_address
  [ search index=owner
  | rename ip as ip_address]
| table host ip_address owner&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is an emulation:&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;| makeresults format=csv data="ip_address,	host
10.1.1.1,	host1
10.1.1.2,	host2
10.1.1.3,	host3
10.1.1.4, 	host4"
    ``` the above emulates
    | inputlookup host.csv
    ```
| join type=left ip_address [makeresults format=csv data="ip,	host,	owner
10.1.1.3,	host3,	owner3
10.1.1.4,	host4,	owner4
10.1.1.5,	host5,	owner5"
    | eval index = "owner"
``` the above emulates
index=owner
```
| rename ip as ip_address]
| table host ip_address owner&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result is the same&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;host&lt;/TD&gt;&lt;TD&gt;ip_address&lt;/TD&gt;&lt;TD&gt;owner&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;host1&lt;/TD&gt;&lt;TD&gt;10.1.1.1&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;host2&lt;/TD&gt;&lt;TD&gt;10.1.1.2&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;host3&lt;/TD&gt;&lt;TD&gt;10.1.1.3&lt;/TD&gt;&lt;TD&gt;owner3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;host4&lt;/TD&gt;&lt;TD&gt;10.1.1.4&lt;/TD&gt;&lt;TD&gt;owner4&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;I suspect that the "bad" output you observe is caused by the 50K row limit. (Try a smaller CSV and a smaller index search you should see.)&lt;/P&gt;&lt;BLOCKQUOTE&gt;In the solution you provided index will be treated as left data because it's specified first&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Unlike join, the append-stats method that many Splunkers use does not really depend on which set is introduced first. &amp;nbsp;The control is in the filter.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 21:13:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/quot-left-join-quot-lookup-from-CSV-to-an-index/m-p/695768#M236547</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2024-08-08T21:13:52Z</dc:date>
    </item>
    <item>
      <title>Re: "left join" lookup from CSV to an index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/quot-left-join-quot-lookup-from-CSV-to-an-index/m-p/696909#M236827</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33901"&gt;@yuanliu&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Can you please help on my other question?&lt;BR /&gt;This is more closer to the real data and it has complexity since it's involving multiple fields&lt;BR /&gt;&lt;A href="https://community.splunk.com/t5/Splunk-Search/How-do-I-quot-Left-join-quot-by-appending-CSV-to-an-index-in/m-p/696908#M236826" target="_blank" rel="noopener"&gt;https://community.splunk.com/t5/Splunk-Search/How-do-I-quot-Left-join-quot-by-appending-CSV-to-an-index-in/m-p/696908#M236826&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I think I solved this, but I wonder if there is a way to do it without merging the string and mvexpand&lt;BR /&gt;I appreciate your help.&amp;nbsp; Thank you so much&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2024 03:49:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/quot-left-join-quot-lookup-from-CSV-to-an-index/m-p/696909#M236827</guid>
      <dc:creator>LearningGuy</dc:creator>
      <dc:date>2024-08-21T03:49:55Z</dc:date>
    </item>
  </channel>
</rss>

