<?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: distinct output from one splunk as input to another in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/distinct-output-from-one-splunk-search-as-input-to-another/m-p/745950#M241581</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/242590"&gt;@bmer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The subsearch is missing the "search" prefix, try this (adjusted to -2d as required)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(index=xxxx) orgName=xxx sourcetype=CASE(SourceB) earliest=-2d 
    [ search (index=xxxx) orgName=xxx sourcetype=CASE(SourceA) earliest=-2d uniqueIdentifier="Class.ClassName.MethodName*" 
    | dedup SourceASqlId 
    | rename SourceASqlId as SourceBSqlId 
    | table SourceBSqlId] 
| table SourceBSqlText&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":glowing_star:"&gt;🌟&lt;/span&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Did this answer help you?&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;If so, please consider:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Adding karma to show it was useful&lt;/LI&gt;&lt;LI&gt;Marking it as the solution if it resolved your issue&lt;/LI&gt;&lt;LI&gt;Commenting if you need any clarification&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Your feedback encourages the volunteers in this community to continue contributing&lt;/P&gt;</description>
    <pubDate>Mon, 12 May 2025 09:37:42 GMT</pubDate>
    <dc:creator>livehybrid</dc:creator>
    <dc:date>2025-05-12T09:37:42Z</dc:date>
    <item>
      <title>distinct output from one splunk search as input to another</title>
      <link>https://community.splunk.com/t5/Splunk-Search/distinct-output-from-one-splunk-search-as-input-to-another/m-p/745941#M241576</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;I have 2 splunks as below&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;(index=xxxx) orgName=xxx sourcetype=CASE(SourceA) earliest=-15d uniqueIdentifier="Class.ClassName.MethodName*" | dedup SourceASqlId | tableSourceASqlId&lt;/LI&gt;&lt;LI&gt;(index=xxxx) orgName=xxx sourcetype=CASE(SourceB)&amp;nbsp;earliest=-15d SourceBSqlId=xxxx | table&amp;nbsp;SourceBSqlText&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I want to form a single splunk to get ALL the &lt;STRONG&gt;distinct&lt;/STRONG&gt; "SourceASqlId" [splunk # 1], get them as input to "SourceBSqlId" [splunk #2] and generate FINAL output as "SourceBSqlText&lt;BR /&gt;&lt;BR /&gt;How can we achieve it.Iam even ok if the date range can be reduce to say 2d to make the splunk optimised as I feel my requirement is very heavy compute intensive&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 12 May 2025 11:19:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/distinct-output-from-one-splunk-search-as-input-to-another/m-p/745941#M241576</guid>
      <dc:creator>bmer</dc:creator>
      <dc:date>2025-05-12T11:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: distinct output from one splunk as input to another</title>
      <link>https://community.splunk.com/t5/Splunk-Search/distinct-output-from-one-splunk-search-as-input-to-another/m-p/745943#M241577</link>
      <description>&lt;P&gt;The simplest way to do this (although perhaps not the most optimal) would be something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(index=xxxx) orgName=xxx sourcetype=CASE(SourceB) earliest=-15d [search (index=xxxx) orgName=xxx sourcetype=CASE(SourceA) earliest=-2d uniqueIdentifier="Class.ClassName.MethodName*" | dedup SourceASqlId | rename SourceASqlId as SourceBSqlId | table SourceBSqlId]
| table SourceBSqlText&lt;/LI-CODE&gt;&lt;P&gt;Bear in mind that subsearches are limited to 50,000 events&lt;/P&gt;</description>
      <pubDate>Mon, 12 May 2025 09:49:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/distinct-output-from-one-splunk-search-as-input-to-another/m-p/745943#M241577</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2025-05-12T09:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: distinct output from one splunk as input to another</title>
      <link>https://community.splunk.com/t5/Splunk-Search/distinct-output-from-one-splunk-search-as-input-to-another/m-p/745947#M241579</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;I received an error saying "&lt;SPAN&gt;&lt;EM&gt;&lt;FONT face="georgia,palatino"&gt;Error in 'SearchParser': Missing a search command before '('.Error at position '90' of search query 'search (index=xxxx) CASE(SourceA) source...&lt;/FONT&gt;&lt;/EM&gt;"&lt;BR /&gt;&lt;BR /&gt;Also any reason why the outer search is of 15d whereas subsearch is set for 2d?Is it for the optimisation?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 May 2025 09:32:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/distinct-output-from-one-splunk-search-as-input-to-another/m-p/745947#M241579</guid>
      <dc:creator>bmer</dc:creator>
      <dc:date>2025-05-12T09:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: distinct output from one splunk as input to another</title>
      <link>https://community.splunk.com/t5/Splunk-Search/distinct-output-from-one-splunk-search-as-input-to-another/m-p/745950#M241581</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/242590"&gt;@bmer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The subsearch is missing the "search" prefix, try this (adjusted to -2d as required)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(index=xxxx) orgName=xxx sourcetype=CASE(SourceB) earliest=-2d 
    [ search (index=xxxx) orgName=xxx sourcetype=CASE(SourceA) earliest=-2d uniqueIdentifier="Class.ClassName.MethodName*" 
    | dedup SourceASqlId 
    | rename SourceASqlId as SourceBSqlId 
    | table SourceBSqlId] 
| table SourceBSqlText&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":glowing_star:"&gt;🌟&lt;/span&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Did this answer help you?&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;If so, please consider:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Adding karma to show it was useful&lt;/LI&gt;&lt;LI&gt;Marking it as the solution if it resolved your issue&lt;/LI&gt;&lt;LI&gt;Commenting if you need any clarification&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Your feedback encourages the volunteers in this community to continue contributing&lt;/P&gt;</description>
      <pubDate>Mon, 12 May 2025 09:37:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/distinct-output-from-one-splunk-search-as-input-to-another/m-p/745950#M241581</guid>
      <dc:creator>livehybrid</dc:creator>
      <dc:date>2025-05-12T09:37:42Z</dc:date>
    </item>
    <item>
      <title>Re: distinct output from one splunk as input to another</title>
      <link>https://community.splunk.com/t5/Splunk-Search/distinct-output-from-one-splunk-search-as-input-to-another/m-p/745953#M241582</link>
      <description>&lt;P&gt;Updated response - you said 2d would be OK - essentially, the subsearch needs to be fewer than 50,000 events, so if 15d matches that requirement, then use 15d otherwise use a smaller amount (like 2d as you suggested).&lt;/P&gt;</description>
      <pubDate>Mon, 12 May 2025 09:51:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/distinct-output-from-one-splunk-search-as-input-to-another/m-p/745953#M241582</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2025-05-12T09:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: distinct output from one splunk search as input to another</title>
      <link>https://community.splunk.com/t5/Splunk-Search/distinct-output-from-one-splunk-search-as-input-to-another/m-p/745959#M241583</link>
      <description>&lt;P&gt;There is most probably a better way to achieve your goal. Try to describe the logic behind what you're trying to do.&lt;/P&gt;&lt;P&gt;Anyway,&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;| dedup A | table A&lt;/PRE&gt;&lt;P&gt;is usually _not_ the way to go. You'd rather want to do&lt;/P&gt;&lt;PRE&gt;| stats values(A) as A | mvexpand A&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 May 2025 11:23:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/distinct-output-from-one-splunk-search-as-input-to-another/m-p/745959#M241583</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2025-05-12T11:23:07Z</dc:date>
    </item>
  </channel>
</rss>

