<?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: map results of 2 queries where results from 1 query need to map to multiple results in second query in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-map-results-of-2-searches-using-Join/m-p/655568#M226463</link>
    <description>&lt;P&gt;Your spelling of Jamie Oliver in your restaurants is wrong - "Jaime" and there is no Rachel Ray in dishes for dish h.&lt;/P&gt;&lt;P&gt;However, this will given you the table - not exactly the same order&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup dishes.csv
| lookup restaurants.csv chef
| inputlookup append=t restaurants.csv
| stats values(*) as * by restaurant chef 
| mvexpand dish
| table restaurant dish chef&lt;/LI-CODE&gt;&lt;P&gt;this also, with ordering more as you have in your table&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup dishes.csv
| lookup restaurants.csv chef
| inputlookup append=t restaurants.csv
| mvexpand restaurant
| eventstats count(dish) as dishes by chef
| where dishes=0 OR isnotnull(dish)
| table restaurant dish chef dishes&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 25 Aug 2023 01:39:57 GMT</pubDate>
    <dc:creator>bowesmana</dc:creator>
    <dc:date>2023-08-25T01:39:57Z</dc:date>
    <item>
      <title>How to map results of 2 searches using Join?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-map-results-of-2-searches-using-Join/m-p/655545#M226450</link>
      <description>&lt;P&gt;as a result of an inputlookup, I have the following table 1(a dish that a chef can prepare, and the chef's name):&lt;/P&gt;
&lt;TABLE width="202"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="87"&gt;dish&lt;/TD&gt;
&lt;TD width="115"&gt;chef&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;a&lt;/TD&gt;
&lt;TD&gt;gordon ramsay&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;b&lt;/TD&gt;
&lt;TD&gt;gordon ramsay&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;c&lt;/TD&gt;
&lt;TD&gt;Guy Fieri&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;d&lt;/TD&gt;
&lt;TD&gt;Guy Fieri&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;f&lt;/TD&gt;
&lt;TD&gt;Jamie Oliver&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;g&lt;/TD&gt;
&lt;TD&gt;gordon ramsay&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;h&lt;/TD&gt;
&lt;TD&gt;&lt;STRIKE&gt;gordon ramsay &lt;/STRIKE&gt;Rachael Ray&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and I have the following table from another outputlookup (the restaurant where a chef works, and the chef name):&lt;/P&gt;
&lt;TABLE width="201px"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="86.9844px"&gt;restaurant&lt;/TD&gt;
&lt;TD width="113.016px"&gt;chef&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="86.9844px"&gt;1&lt;/TD&gt;
&lt;TD width="113.016px"&gt;gordon ramsay&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="86.9844px"&gt;2&lt;/TD&gt;
&lt;TD width="113.016px"&gt;Guy Fieri&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="86.9844px"&gt;3&lt;/TD&gt;
&lt;TD width="113.016px"&gt;Guy Fieri&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="86.9844px"&gt;4&lt;/TD&gt;
&lt;TD width="113.016px"&gt;Jaime Oliver&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="86.9844px"&gt;5&lt;/TD&gt;
&lt;TD width="113.016px"&gt;Michael Caines&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;BR /&gt;I want to combine the 2 tables into this:&lt;/P&gt;
&lt;TABLE width="282"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="87"&gt;restaurant&lt;/TD&gt;
&lt;TD width="87"&gt;dish&lt;/TD&gt;
&lt;TD width="108"&gt;chef&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;a&lt;/TD&gt;
&lt;TD&gt;gordon ramsay&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;b&lt;/TD&gt;
&lt;TD&gt;gordon ramsay&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;2&lt;/TD&gt;
&lt;TD&gt;c&lt;/TD&gt;
&lt;TD&gt;Guy Fieri&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;2&lt;/TD&gt;
&lt;TD&gt;d&lt;/TD&gt;
&lt;TD&gt;Guy Fieri&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;3&lt;/TD&gt;
&lt;TD&gt;c&lt;/TD&gt;
&lt;TD&gt;Guy Fieri&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;3&lt;/TD&gt;
&lt;TD&gt;d&lt;/TD&gt;
&lt;TD&gt;Guy Fieri&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;4&lt;/TD&gt;
&lt;TD&gt;f&lt;/TD&gt;
&lt;TD&gt;Jamie Oliver&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;g&lt;/TD&gt;
&lt;TD&gt;gordon ramsay&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;h&lt;/TD&gt;
&lt;TD&gt;gordon ramsay&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;5&lt;/TD&gt;
&lt;TD&gt;null&lt;/TD&gt;
&lt;TD&gt;Michael Caines&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;null&lt;/TD&gt;
&lt;TD&gt;h&lt;/TD&gt;
&lt;TD&gt;Rachael Ray&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;Basically, based on tables 1 &amp;amp; 2, how do I get a table telling me the restaurant where a chef works, the dishes that he/she would prepare, and the chef's name?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;In stuff I've tried,&amp;nbsp; I'm able to combine table 1 &amp;amp; 2 with the join command, but a lot of results end up getting filtered out. (eg. I might end up with one result per chef but not getting all the dishes, or one result per dish but not getting all the restaurants).&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2023 16:42:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-map-results-of-2-searches-using-Join/m-p/655545#M226450</guid>
      <dc:creator>dasaed</dc:creator>
      <dc:date>2023-08-28T16:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: map results of 2 queries where results from 1 query need to map to multiple results in second query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-map-results-of-2-searches-using-Join/m-p/655568#M226463</link>
      <description>&lt;P&gt;Your spelling of Jamie Oliver in your restaurants is wrong - "Jaime" and there is no Rachel Ray in dishes for dish h.&lt;/P&gt;&lt;P&gt;However, this will given you the table - not exactly the same order&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup dishes.csv
| lookup restaurants.csv chef
| inputlookup append=t restaurants.csv
| stats values(*) as * by restaurant chef 
| mvexpand dish
| table restaurant dish chef&lt;/LI-CODE&gt;&lt;P&gt;this also, with ordering more as you have in your table&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup dishes.csv
| lookup restaurants.csv chef
| inputlookup append=t restaurants.csv
| mvexpand restaurant
| eventstats count(dish) as dishes by chef
| where dishes=0 OR isnotnull(dish)
| table restaurant dish chef dishes&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 01:39:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-map-results-of-2-searches-using-Join/m-p/655568#M226463</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2023-08-25T01:39:57Z</dc:date>
    </item>
    <item>
      <title>Re: map results of 2 queries where results from 1 query need to map to multiple results in second query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-map-results-of-2-searches-using-Join/m-p/656000#M226563</link>
      <description>&lt;P&gt;just wanna say thanks. Your solution worked for my case &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 17:14:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-map-results-of-2-searches-using-Join/m-p/656000#M226563</guid>
      <dc:creator>dasaed</dc:creator>
      <dc:date>2023-08-29T17:14:05Z</dc:date>
    </item>
  </channel>
</rss>

