<?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: corelating two different data sets in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/corelating-two-different-data-sets/m-p/684229#M19135</link>
    <description>&lt;LI-CODE lang="markup"&gt;``` Set a flag based on sourcetype ```
| eval flag=if(sourcetype="ma",1,2)
``` Get single event for each ParentOrderID by sourcetype (dedup) ```
| stats vakues(flag) as flag by ParentOrderID sourcetype
``` Add flags from both sourcetypes ```
| stats sum(flag) as flags by ParentOrderID
``` Count each type of flag ```
| stats count by flags
``` Flags is 1 for ma only, 2 for cs only, 3 for both ma and cs ```&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 15 Apr 2024 11:08:06 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2024-04-15T11:08:06Z</dc:date>
    <item>
      <title>corelating two different data sets</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/corelating-two-different-data-sets/m-p/684215#M19132</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am trying to get the execution count based on the parentIDs over two different data sets. Please could you review and suggest ?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to see what's execution count&amp;nbsp; between (sourcetype=cs, sourcetype=ma) , only the field&amp;nbsp;&lt;STRONG&gt;ParentOrderID&amp;nbsp;&lt;/STRONG&gt;is common between cs, ma sourcetype.&lt;/P&gt;
&lt;P&gt;Note: daily close to ~10Million events are loaded&amp;nbsp; into splunk and unique execution will be 4Million.Also, sometime the join query is getting auto-canceled.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;SPL:&lt;/STRONG&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=india sourcetype=ma NOT (source=*OPT* OR app_instance=MA_DROP_SESSION OR "11555=Y-NOBK" OR fix_applicationInstanceID IN(*OPT*,*GWIM*)) msgType=8 (execType=1 OR execType=2 OR execType=F) stream=Outgoing app_instance=UPSTREAM "clientid=XAC*"
| dedup fix_execID,ParentOrderID
| stats count
| join ParentOrderID
[ search index=india sourcetype=cs NOT (source=*OPT* OR "11555=Y-NOBK" OR applicationInstanceID IN(*OPT*,*GWIM*)) msgType=8 (execType=1 OR execType=2 OR execType=F) app_instance=PUBHUB stream=Outgoing "clientid=XAC" "sourceid=AX_DN_XAC"
| dedup execID,ParentOrderID
| stats count]&lt;/LI-CODE&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Selvam.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2024 08:53:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/corelating-two-different-data-sets/m-p/684215#M19132</guid>
      <dc:creator>selvam_sekar</dc:creator>
      <dc:date>2024-04-15T08:53:02Z</dc:date>
    </item>
    <item>
      <title>Re: corelating two different data sets</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/corelating-two-different-data-sets/m-p/684216#M19133</link>
      <description>&lt;P&gt;Sub-searches e.g. those used by join, are limited, so you could try combining the initial search like so&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=india (sourcetype=ma NOT (source=*OPT* OR app_instance=MA_DROP_SESSION OR "11555=Y-NOBK" OR fix_applicationInstanceID IN(*OPT*,*GWIM*)) msgType=8 (execType=1 OR execType=2 OR execType=F) stream=Outgoing app_instance=UPSTREAM "clientid=XAC*") OR (sourcetype=cs NOT (source=*OPT* OR "11555=Y-NOBK" OR applicationInstanceID IN(*OPT*,*GWIM*)) msgType=8 (execType=1 OR execType=2 OR execType=F) app_instance=PUBHUB stream=Outgoing "clientid=XAC" "sourceid=AX_DN_XAC")&lt;/LI-CODE&gt;&lt;P&gt;Next you have to work out what is meant by your dedup. For example, if you rename fix_execID as execID, you could do your dedup like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats count execID ParentOrderID sourcetype&lt;/LI-CODE&gt;&lt;P&gt;Next problem is your join (apart from avoiding joins in the first place (with the combined initial search), your two searches do not return ParentOrderID since they both end with stats count, therefore the only field you have to join with is count, and I suspect this is not what you require?&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2024 09:03:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/corelating-two-different-data-sets/m-p/684216#M19133</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-04-15T09:03:38Z</dc:date>
    </item>
    <item>
      <title>Re: corelating two different data sets</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/corelating-two-different-data-sets/m-p/684226#M19134</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; thank you.&lt;/P&gt;&lt;P&gt;I am trying to get the total execution id count between the different sourcetype, where parent id is equal.&amp;nbsp; As per the design, sourcetype=ma execution will be higher than sourcetype=cs.&lt;/P&gt;&lt;P&gt;But, i want to get execution count of sourcetype=ma that has sent to sourcetype=cs.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2024 10:42:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/corelating-two-different-data-sets/m-p/684226#M19134</guid>
      <dc:creator>selvam_sekar</dc:creator>
      <dc:date>2024-04-15T10:42:43Z</dc:date>
    </item>
    <item>
      <title>Re: corelating two different data sets</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/corelating-two-different-data-sets/m-p/684229#M19135</link>
      <description>&lt;LI-CODE lang="markup"&gt;``` Set a flag based on sourcetype ```
| eval flag=if(sourcetype="ma",1,2)
``` Get single event for each ParentOrderID by sourcetype (dedup) ```
| stats vakues(flag) as flag by ParentOrderID sourcetype
``` Add flags from both sourcetypes ```
| stats sum(flag) as flags by ParentOrderID
``` Count each type of flag ```
| stats count by flags
``` Flags is 1 for ma only, 2 for cs only, 3 for both ma and cs ```&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 15 Apr 2024 11:08:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/corelating-two-different-data-sets/m-p/684229#M19135</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-04-15T11:08:06Z</dc:date>
    </item>
  </channel>
</rss>

