<?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 across multiple sources display all sources with values present or not in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Join-across-multiple-sources-display-all-sources-with-values/m-p/482256#M193203</link>
    <description>&lt;P&gt;Getting close answer like one below after couple changes, need 2 more changes&lt;BR /&gt;
1)Want to break down results correlation id by correlation id and display all 4 sourcetypes for each corr-id&lt;BR /&gt;
2)display null values for source types where corr-id don't exists&lt;BR /&gt;
Actual -&lt;BR /&gt;
1129213a-6d34-46e3-a7d7-2e2fcc552045    API_HUB 1&lt;BR /&gt;
1129213a-6d34-46e3-a7d7-2e2fcc552045    API_RISK    1&lt;BR /&gt;
116f755f-2c67-4604-b98a-90ed0bb43f74    API_RISK    1&lt;BR /&gt;
11f7a987-e7a8-4ba3-9445-8ad92f4ecc05    API_PAY 1&lt;BR /&gt;
11f7a987-e7a8-4ba3-9445-8ad92f4ecc05    API_RISK 1&lt;/P&gt;

&lt;P&gt;Expected-&lt;BR /&gt;
1129213a-6d34-46e3-a7d7-2e2fcc552045    API_HUB 1&lt;BR /&gt;
1129213a-6d34-46e3-a7d7-2e2fcc552045    API_RISK    1&lt;BR /&gt;
NULL                                                                       API_PAY&lt;BR /&gt;&lt;BR /&gt;
NULL                                                                       API_PAY1&lt;/P&gt;

&lt;P&gt;116f755f-2c67-4604-b98a-90ed0bb43f74    API_RISK    1&lt;BR /&gt;
NULL                                                                API_RISK    1&lt;BR /&gt;
NULL                                                                       API_PAY&lt;BR /&gt;&lt;BR /&gt;
NULL                                                                       API_PAY1&lt;/P&gt;

&lt;P&gt;Modified new query is below, can this be modified to get expected results above ?&lt;BR /&gt;
sourcetype=API_HUB OR sourcetype=API_RISK   OR sourcetype=API_PAY OR sourcetype=API_PAY2&lt;BR /&gt;
 | stats values(CorrelationId) as CorrelationId by sourcetype&lt;BR /&gt;
 |append [|makeresults &lt;BR /&gt;
 |eval sourcetype=split("API_HUB,API_RISK,API_PAY ,API_PAY2" ,",")&lt;BR /&gt;
 | mvexpand sourcetype&lt;BR /&gt;
 | fields sourcetype]&lt;BR /&gt;
 | stats count by CorrelationId,sourcetype&lt;BR /&gt;
 | fillnull value="Not exists" CorrelationId | sort (CorrelationId)&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 05:05:17 GMT</pubDate>
    <dc:creator>msrama5</dc:creator>
    <dc:date>2020-09-30T05:05:17Z</dc:date>
    <item>
      <title>Join across multiple sources display all sources with values present or not</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-across-multiple-sources-display-all-sources-with-values/m-p/482252#M193199</link>
      <description>&lt;P&gt;Hello, I have query which joins across 4 sources and correlationid may or may not exists across all sources, I want to print the id and exists or not exists on each source, wrote the query below and actual results only shows one source where value is present and does not show other 3 sources, any ideas how can this query be modified to show expected results ? &lt;BR /&gt;
Query -&lt;BR /&gt;
sourcetype=API_HUB OR sourcetype=API_RISK OR sourcetype=API_SECURE OR sourcetype=API_PAYMENT&lt;BR /&gt;
  | eval CorrelationId = coalesce(CorrelationId,"Not exists") &lt;BR /&gt;
  | table sourcetype,CorrelationId |  dedup CorrelationId,sourcetype | sort(sourcetype,CorrelationId)&lt;/P&gt;

&lt;P&gt;Actual results&lt;BR /&gt;
sourcetype                                  CorrelationId&lt;BR /&gt;
API_RISK                                    123456-34344-55555&lt;/P&gt;

&lt;P&gt;Expected results&lt;BR /&gt;
sourcetype                                  CorrelationId&lt;BR /&gt;
API_RISK                                    123456-34344-55555&lt;BR /&gt;
API_PAYMENT                               Not exists&lt;BR /&gt;
API_SECURE                                   Not exists&lt;BR /&gt;
API_HUB                                         Not exists&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 05:07:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-across-multiple-sources-display-all-sources-with-values/m-p/482252#M193199</guid>
      <dc:creator>msrama5</dc:creator>
      <dc:date>2020-09-30T05:07:44Z</dc:date>
    </item>
    <item>
      <title>Re: Join across multiple sources display all sources with values present or not</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-across-multiple-sources-display-all-sources-with-values/m-p/482253#M193200</link>
      <description>&lt;P&gt;@msrama5 ,&lt;BR /&gt;
Do you have events for other sourcetypes?&lt;BR /&gt;&lt;BR /&gt;
Try below search for the same time window. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=API_HUB OR sourcetype=API_RISK OR sourcetype=API_SECURE OR sourcetype=API_PAYMENT|stats count by sourcetype
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Apr 2020 03:44:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-across-multiple-sources-display-all-sources-with-values/m-p/482253#M193200</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2020-04-23T03:44:49Z</dc:date>
    </item>
    <item>
      <title>Re: Join across multiple sources display all sources with values present or not</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-across-multiple-sources-display-all-sources-with-values/m-p/482254#M193201</link>
      <description>&lt;P&gt;I wrote the query using map for find correlation id in first query and substitute one by one in second query to return results for each id as below, this query is not working, wanting to get corrid and substitute in second query as is, any ideas what is wrong with query below ? no results are returned for query below&lt;BR /&gt;
sourcetype=OPENAPI_HUB | stats count by CorrelationId | &lt;BR /&gt;
map  search="search "$CorrelationId$" sourcetype=OPENAPI_HUB OR sourcetype=OPEN_ASSESSMENT OR sourcetype=OPEN_TEST OR sourcetype=OPENAPI_DEV   | eval CorrelationId = coalesce(CorrelationId,"Not exists")  | stats count by CorrelationId,sourcetype | sort(CorrelationId,sourcetype)"&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 05:04:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-across-multiple-sources-display-all-sources-with-values/m-p/482254#M193201</guid>
      <dc:creator>msrama5</dc:creator>
      <dc:date>2020-09-30T05:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: Join across multiple sources display all sources with values present or not</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-across-multiple-sources-display-all-sources-with-values/m-p/482255#M193202</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;sourcetype=API_HUB OR sourcetype=API_RISK OR sourcetype=API_SECURE OR sourcetype=API_PAYMENT
| stats values(CorrelationId) as CorrelationId by sourcetype
|append [|makeresults 
|eval sourcetype=split("API_HUB,API_RISK,API_SECURE,API_PAYMENT" ,",")
| mvexpand sourcetype
| fields sourcetype]
| stats values(CorrelationId) as CorrelationId by sourcetype
| fillnull value="Not exists" CorrelationId
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Splunk can't search nothing.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 10:07:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-across-multiple-sources-display-all-sources-with-values/m-p/482255#M193202</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-04-23T10:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: Join across multiple sources display all sources with values present or not</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-across-multiple-sources-display-all-sources-with-values/m-p/482256#M193203</link>
      <description>&lt;P&gt;Getting close answer like one below after couple changes, need 2 more changes&lt;BR /&gt;
1)Want to break down results correlation id by correlation id and display all 4 sourcetypes for each corr-id&lt;BR /&gt;
2)display null values for source types where corr-id don't exists&lt;BR /&gt;
Actual -&lt;BR /&gt;
1129213a-6d34-46e3-a7d7-2e2fcc552045    API_HUB 1&lt;BR /&gt;
1129213a-6d34-46e3-a7d7-2e2fcc552045    API_RISK    1&lt;BR /&gt;
116f755f-2c67-4604-b98a-90ed0bb43f74    API_RISK    1&lt;BR /&gt;
11f7a987-e7a8-4ba3-9445-8ad92f4ecc05    API_PAY 1&lt;BR /&gt;
11f7a987-e7a8-4ba3-9445-8ad92f4ecc05    API_RISK 1&lt;/P&gt;

&lt;P&gt;Expected-&lt;BR /&gt;
1129213a-6d34-46e3-a7d7-2e2fcc552045    API_HUB 1&lt;BR /&gt;
1129213a-6d34-46e3-a7d7-2e2fcc552045    API_RISK    1&lt;BR /&gt;
NULL                                                                       API_PAY&lt;BR /&gt;&lt;BR /&gt;
NULL                                                                       API_PAY1&lt;/P&gt;

&lt;P&gt;116f755f-2c67-4604-b98a-90ed0bb43f74    API_RISK    1&lt;BR /&gt;
NULL                                                                API_RISK    1&lt;BR /&gt;
NULL                                                                       API_PAY&lt;BR /&gt;&lt;BR /&gt;
NULL                                                                       API_PAY1&lt;/P&gt;

&lt;P&gt;Modified new query is below, can this be modified to get expected results above ?&lt;BR /&gt;
sourcetype=API_HUB OR sourcetype=API_RISK   OR sourcetype=API_PAY OR sourcetype=API_PAY2&lt;BR /&gt;
 | stats values(CorrelationId) as CorrelationId by sourcetype&lt;BR /&gt;
 |append [|makeresults &lt;BR /&gt;
 |eval sourcetype=split("API_HUB,API_RISK,API_PAY ,API_PAY2" ,",")&lt;BR /&gt;
 | mvexpand sourcetype&lt;BR /&gt;
 | fields sourcetype]&lt;BR /&gt;
 | stats count by CorrelationId,sourcetype&lt;BR /&gt;
 | fillnull value="Not exists" CorrelationId | sort (CorrelationId)&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 05:05:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-across-multiple-sources-display-all-sources-with-values/m-p/482256#M193203</guid>
      <dc:creator>msrama5</dc:creator>
      <dc:date>2020-09-30T05:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: Join across multiple sources display all sources with values present or not</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-across-multiple-sources-display-all-sources-with-values/m-p/482257#M193204</link>
      <description>&lt;P&gt;sorry. I don't know your log. and your query is changed from question. so I can't make it.&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/8757i302200AB756B4836/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;maybe, this result will be wrong.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2020 00:36:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-across-multiple-sources-display-all-sources-with-values/m-p/482257#M193204</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-04-24T00:36:49Z</dc:date>
    </item>
  </channel>
</rss>

