<?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: Join fields from 2 searches without join in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Join-fields-from-2-searches-without-join/m-p/465776#M191758</link>
    <description>&lt;P&gt;You can definitely use the suggestion above about creating a lookup, and then using the &lt;CODE&gt;lookup&lt;/CODE&gt; command like this: &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| lookup csvName.csv ID_1 OUTPUT ISSUE&lt;/CODE&gt;, and then you can run aggregations on that ISSUE field (the ID_1 is the joining field)&lt;/P&gt;

&lt;P&gt;You can use a &lt;CODE&gt;stats&lt;/CODE&gt; command as well, but it's a bit difficult to understand what is the most ideal given the data you've given and you'd have to do a bit more fanciness with the fields. If you're just looking for instances of B, you can filter your second sourcetype to that in the base search and then run a command like this:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;base search filtering to only B logs&lt;BR /&gt;
| stats count(ISSUE) as issueCount, values(DESCRIPTION) as description by ID_1&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Let me know if this is helpful/you have any other questions&lt;/P&gt;</description>
    <pubDate>Thu, 24 Oct 2019 19:57:06 GMT</pubDate>
    <dc:creator>aberkow</dc:creator>
    <dc:date>2019-10-24T19:57:06Z</dc:date>
    <item>
      <title>Join fields from 2 searches without join</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-fields-from-2-searches-without-join/m-p/465774#M191756</link>
      <description>&lt;P&gt;Hi, I need some help with a little issue, I have 2 sorcetypes like this:&lt;/P&gt;

&lt;P&gt;SOURCETYPE A:&lt;/P&gt;

&lt;P&gt;ID_1      | DESCRIPCION&lt;BR /&gt;
1         |           RED&lt;BR /&gt;
2     |         BLUE&lt;BR /&gt;
3        |      GREEN&lt;BR /&gt;
4        |      YELLOW&lt;BR /&gt;
5          |    ORANGE&lt;/P&gt;

&lt;P&gt;SOURCETYPE B:&lt;/P&gt;

&lt;P&gt;ID_1    |ISSUE&lt;BR /&gt;
1   |A&lt;BR /&gt;
1   |B&lt;BR /&gt;
1   |B&lt;BR /&gt;
3   |B&lt;BR /&gt;
4   |C&lt;/P&gt;

&lt;P&gt;I try to find how many ID's have a issue B, the result be like this:&lt;/P&gt;

&lt;P&gt;RED 2&lt;BR /&gt;
GREEN 1&lt;/P&gt;

&lt;P&gt;Currently my search use join clause, but it's very slow and i try to find the better way to do this,&lt;/P&gt;

&lt;P&gt;someone could help me?&lt;BR /&gt;
Regards,&lt;BR /&gt;
J&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2019 18:36:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-fields-from-2-searches-without-join/m-p/465774#M191756</guid>
      <dc:creator>jtg1703</dc:creator>
      <dc:date>2019-10-24T18:36:14Z</dc:date>
    </item>
    <item>
      <title>Re: Join fields from 2 searches without join</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-fields-from-2-searches-without-join/m-p/465775#M191757</link>
      <description>&lt;P&gt;Seems you have material to build a static lookup. Your sourcetype A that has the description can be outputed to a lookups that you can use to enrich your stats on sourcetype B&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2019 19:48:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-fields-from-2-searches-without-join/m-p/465775#M191757</guid>
      <dc:creator>tiagofbmm</dc:creator>
      <dc:date>2019-10-24T19:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: Join fields from 2 searches without join</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-fields-from-2-searches-without-join/m-p/465776#M191758</link>
      <description>&lt;P&gt;You can definitely use the suggestion above about creating a lookup, and then using the &lt;CODE&gt;lookup&lt;/CODE&gt; command like this: &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| lookup csvName.csv ID_1 OUTPUT ISSUE&lt;/CODE&gt;, and then you can run aggregations on that ISSUE field (the ID_1 is the joining field)&lt;/P&gt;

&lt;P&gt;You can use a &lt;CODE&gt;stats&lt;/CODE&gt; command as well, but it's a bit difficult to understand what is the most ideal given the data you've given and you'd have to do a bit more fanciness with the fields. If you're just looking for instances of B, you can filter your second sourcetype to that in the base search and then run a command like this:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;base search filtering to only B logs&lt;BR /&gt;
| stats count(ISSUE) as issueCount, values(DESCRIPTION) as description by ID_1&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Let me know if this is helpful/you have any other questions&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2019 19:57:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-fields-from-2-searches-without-join/m-p/465776#M191758</guid>
      <dc:creator>aberkow</dc:creator>
      <dc:date>2019-10-24T19:57:06Z</dc:date>
    </item>
  </channel>
</rss>

