<?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: Joining searches on common columns in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Joining-searches-on-common-columns/m-p/707668#M239340</link>
    <description>&lt;P&gt;im gonna try this thanks!!&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I think i got something like all the results into one row and performance is very bad as there are many events i did not manage to get a proper search result&lt;/P&gt;</description>
    <pubDate>Sat, 28 Dec 2024 16:20:38 GMT</pubDate>
    <dc:creator>siu</dc:creator>
    <dc:date>2024-12-28T16:20:38Z</dc:date>
    <item>
      <title>Joining searches on common columns</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-searches-on-common-columns/m-p/707616#M239316</link>
      <description>&lt;P&gt;HI query joining 2 searches on left join.&lt;BR /&gt;&lt;BR /&gt;Its matching some rows and not matching some rows although the column where I join on is clearly seen in both searches.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=sky sourcetype=sky_trade_murex_timestamp 
| rex field=_raw "trade_id=\"(?&amp;lt;trade_id&amp;gt;\d+)\"" 
| rex field=_raw "mx_status=\"(?&amp;lt;mx_status&amp;gt;[^\"]+)\""
| rex field=_raw "sky_id=\"(?&amp;lt;sky_id&amp;gt;\d+)\"" 
| rex field=_raw "event_id=\"(?&amp;lt;event_id&amp;gt;\d+)\""
| rex field=_raw "operation=\"(?&amp;lt;operation&amp;gt;[^\"]+)\""
| rex field=_raw "action=\"(?&amp;lt;action&amp;gt;[^\"]+)\""
| rex field=_raw "tradebooking_sgp=\"(?&amp;lt;tradebooking_sgp&amp;gt;[^\"]+)\""
| rex field=_raw "portfolio_name=\"(?&amp;lt;portfolio_name&amp;gt;[^\"]+)\""
| rex field=_raw "portfolio_entity=\"(?&amp;lt;portfolio_entity&amp;gt;[^\"]+)\""
| rex field=_raw "trade_type=\"(?&amp;lt;trade_type&amp;gt;[^\"]+)\""
| rename trade_id as NB
| dedup NB
| eval NB = tostring(trim(NB))
| table sky_id, NB, event_id, mx_status, operation, action, tradebooking_sgp, portfolio_name, portfolio_entity, trade_type
| join type=left NB
[ search index=sky sourcetype=mx_to_sky
| rex field=_raw "(?&amp;lt;NB&amp;gt;\d+);(?&amp;lt;TRN_STATUS&amp;gt;[^;]+);(?&amp;lt;NOMINAL&amp;gt;[^;]+);(?&amp;lt;CURRENCY&amp;gt;[^;]+);(?&amp;lt;TRN_FMLY&amp;gt;[^;]+);(?&amp;lt;TRN_GRP&amp;gt;[^;]+);(?&amp;lt;TRN_TYPE&amp;gt;[^;]*);(?&amp;lt;BPFOLIO&amp;gt;[^;]*);(?&amp;lt;SPFOLIO&amp;gt;[^;]*)"
| eval NB = tostring(trim(NB))
| table TRN_STATUS, NB, NOMINAL, CURRENCY, TRN_FMLY, TRN_GRP, TRN_TYPE, BPFOLIO, SPFOLIO]
| table sky_id, NB, event_id, mx_status, operation, action, tradebooking_sgp, portfolio_name, portfolio_entity, trade_type, TRN_STATUS, NOMINAL, CURRENCY, TRN_FMLY, TRN_GRP, TRN_TYPE, BPFOLIO, SPFOLIO&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;This above is my source code&lt;BR /&gt;&lt;BR /&gt;And the raw data is&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Time	Event
27/12/2024
17:05:39.000	
32265376;DEAD;3887.00000000;XAU;CURR;FXD;FXD;CM TR GLD AUS;X_CMTR XAU SWAP
host = APPSG002SIN0117source = D:\SkyNet\data\mx_trade_report\MX2_TRADE_STATUS_20241227_200037.csvsourcetype = mx_to_sky&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Time	Event
27/12/2024
18:05:36.651	
2024-12-27 18:05:36.651, system="murex", id="645131777", sky_id="645131777", trade_id="32265483", event_id="100023788", mx_status="DEAD", operation="NETTING", action="insertion", tradebooking_sgp="2024/12/26 01:02:01.0000", eventtime_sgp="2024/12/26 01:01:51.7630", sky_to_mq_latency="-9.-237", portfolio_name="I CREDIT INC", portfolio_entity="ANZSEC INC", trade_type="BondTrade"
host = APPSG002SIN0032source = sky_trade_murex_timestamp sourcetype = sky_trade_murex_timestamp&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Dec 2024 10:23:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-searches-on-common-columns/m-p/707616#M239316</guid>
      <dc:creator>siu</dc:creator>
      <dc:date>2024-12-27T10:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: Joining searches on common columns</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-searches-on-common-columns/m-p/707617#M239317</link>
      <description>&lt;P&gt;And the problem is these columns are empty for some and populated for some. For those empty, I clearly checked the NB is matching in both searches&lt;BR /&gt;&lt;BR /&gt;TRN_STATUS, NOMINAL, CURRENCY, TRN_FMLY, TRN_GRP, TRN_TYPE, BPFOLIO, SPFOLIO&lt;/P&gt;</description>
      <pubDate>Fri, 27 Dec 2024 10:24:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-searches-on-common-columns/m-p/707617#M239317</guid>
      <dc:creator>siu</dc:creator>
      <dc:date>2024-12-27T10:24:56Z</dc:date>
    </item>
    <item>
      <title>Re: Joining searches on common columns</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-searches-on-common-columns/m-p/707620#M239318</link>
      <description>&lt;P&gt;Your regex assumes (insists!) that the event has 9 fields separated by (8) semi-colons - your sample data has only 8 fields separated by 7 semi-colons.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Dec 2024 10:59:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-searches-on-common-columns/m-p/707620#M239318</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-12-27T10:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: Joining searches on common columns</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-searches-on-common-columns/m-p/707621#M239319</link>
      <description>&lt;P&gt;Sorry how do i rectify it?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;32265376;DEAD;3887.00000000;XAU;CURR;FXD;FXD;CM TR GLD AUS;X_CMTR XAU SWAP&lt;/PRE&gt;&lt;P&gt;Did u mean this&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Dec 2024 11:30:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-searches-on-common-columns/m-p/707621#M239319</guid>
      <dc:creator>siu</dc:creator>
      <dc:date>2024-12-27T11:30:44Z</dc:date>
    </item>
    <item>
      <title>Re: Joining searches on common columns</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-searches-on-common-columns/m-p/707622#M239320</link>
      <description>&lt;P&gt;Sorry I miscounted, it does look right - the issue here is that the trade_id does not match the first field in the mx_to_sky event&lt;/P&gt;</description>
      <pubDate>Fri, 27 Dec 2024 12:22:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-searches-on-common-columns/m-p/707622#M239320</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-12-27T12:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: Joining searches on common columns</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-searches-on-common-columns/m-p/707624#M239321</link>
      <description>&lt;P&gt;Assuming both your joined searches produce proper results (it's up to you to check it - we don't know), the easiest and most straightforward way to avoid join altogether is to use multisearch to run those in parallel and then stats the results. This way you're not prone to hit join's limits and since your searches are streaming ones you can use multisearch and you're not limited by subsearch limits which you might hit when using append.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| multisearch [
search index=sky sourcetype=sky_trade_murex_timestamp 
| rex field=_raw "trade_id=\"(?&amp;lt;trade_id&amp;gt;\d+)\"" 
| rex field=_raw "mx_status=\"(?&amp;lt;mx_status&amp;gt;[^\"]+)\""
| rex field=_raw "sky_id=\"(?&amp;lt;sky_id&amp;gt;\d+)\"" 
| rex field=_raw "event_id=\"(?&amp;lt;event_id&amp;gt;\d+)\""
| rex field=_raw "operation=\"(?&amp;lt;operation&amp;gt;[^\"]+)\""
| rex field=_raw "action=\"(?&amp;lt;action&amp;gt;[^\"]+)\""
| rex field=_raw "tradebooking_sgp=\"(?&amp;lt;tradebooking_sgp&amp;gt;[^\"]+)\""
| rex field=_raw "portfolio_name=\"(?&amp;lt;portfolio_name&amp;gt;[^\"]+)\""
| rex field=_raw "portfolio_entity=\"(?&amp;lt;portfolio_entity&amp;gt;[^\"]+)\""
| rex field=_raw "trade_type=\"(?&amp;lt;trade_type&amp;gt;[^\"]+)\""
| rename trade_id as NB
| dedup NB
| eval NB = tostring(trim(NB))
| table sky_id, NB, event_id, mx_status, operation, action, tradebooking_sgp, portfolio_name, portfolio_entity, trade_type ]
[ search index=sky sourcetype=mx_to_sky
| rex field=_raw "(?&amp;lt;NB&amp;gt;\d+);(?&amp;lt;TRN_STATUS&amp;gt;[^;]+);(?&amp;lt;NOMINAL&amp;gt;[^;]+);(?&amp;lt;CURRENCY&amp;gt;[^;]+);(?&amp;lt;TRN_FMLY&amp;gt;[^;]+);(?&amp;lt;TRN_GRP&amp;gt;[^;]+);(?&amp;lt;TRN_TYPE&amp;gt;[^;]*);(?&amp;lt;BPFOLIO&amp;gt;[^;]*);(?&amp;lt;SPFOLIO&amp;gt;[^;]*)"
| eval NB = tostring(trim(NB))
| table TRN_STATUS, NB, NOMINAL, CURRENCY, TRN_FMLY, TRN_GRP, TRN_TYPE, BPFOLIO, SPFOLIO ]
| stats values(*) as * by NB&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Dec 2024 15:01:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-searches-on-common-columns/m-p/707624#M239321</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-12-27T15:01:10Z</dc:date>
    </item>
    <item>
      <title>Re: Joining searches on common columns</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-searches-on-common-columns/m-p/707625#M239322</link>
      <description>&lt;P&gt;No problem. But why is it that some rows are populated and some are not then? i.e some match and some don't match. I renamed trade_id as NB then left=join NB so it should join 2 of them together but why does it not work for some rows or columns although clearly it matches in both searches?&lt;/P&gt;</description>
      <pubDate>Fri, 27 Dec 2024 15:00:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-searches-on-common-columns/m-p/707625#M239322</guid>
      <dc:creator>siu</dc:creator>
      <dc:date>2024-12-27T15:00:54Z</dc:date>
    </item>
    <item>
      <title>Re: Joining searches on common columns</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-searches-on-common-columns/m-p/707627#M239323</link>
      <description>&lt;P&gt;Thanks!! I get this error though&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;Error in 'multisearch' command: Multisearch subsearches might only contain purely streaming operations (subsearch 1 contains a non-streaming command).&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 27 Dec 2024 15:12:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-searches-on-common-columns/m-p/707627#M239323</guid>
      <dc:creator>siu</dc:creator>
      <dc:date>2024-12-27T15:12:05Z</dc:date>
    </item>
    <item>
      <title>Re: Joining searches on common columns</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-searches-on-common-columns/m-p/707629#M239324</link>
      <description>&lt;P&gt;If there are results for the trade_id/NB in both searches, then it is possible that the rex has not extracted the fields as you expect. Please share the two events which don't match&lt;/P&gt;</description>
      <pubDate>Fri, 27 Dec 2024 15:42:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-searches-on-common-columns/m-p/707629#M239324</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-12-27T15:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: Joining searches on common columns</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-searches-on-common-columns/m-p/707630#M239325</link>
      <description>&lt;P&gt;Ahhhh... The "table" command is a transforming command. So you can't use it in either search. Use "fields" instead.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Dec 2024 15:48:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-searches-on-common-columns/m-p/707630#M239325</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-12-27T15:48:29Z</dc:date>
    </item>
    <item>
      <title>Re: Joining searches on common columns</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-searches-on-common-columns/m-p/707637#M239326</link>
      <description>&lt;P&gt;Its quite random but here is one&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;2024-12-27&lt;/SPAN&gt; &lt;SPAN class=""&gt;23:05:09.917&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN class=""&gt;system=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;murex&lt;/SPAN&gt;&lt;SPAN&gt;", &lt;/SPAN&gt;&lt;SPAN class=""&gt;id=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;645437844&lt;/SPAN&gt;&lt;SPAN&gt;", &lt;/SPAN&gt;&lt;SPAN class=""&gt;sky_id=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;645437844&lt;/SPAN&gt;&lt;SPAN&gt;", &lt;/SPAN&gt;&lt;SPAN class=""&gt;trade_id=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;31791027&lt;/SPAN&gt;&lt;SPAN&gt;", &lt;/SPAN&gt;&lt;SPAN class=""&gt;event_id=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;100038914&lt;/SPAN&gt;&lt;SPAN&gt;", &lt;/SPAN&gt;&lt;SPAN class=""&gt;mx_status=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;live&lt;/SPAN&gt;&lt;SPAN&gt;", &lt;/SPAN&gt;&lt;SPAN class=""&gt;operation=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;nooperation&lt;/SPAN&gt;&lt;SPAN&gt;", &lt;/SPAN&gt;&lt;SPAN class=""&gt;action=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;fixing&lt;/SPAN&gt;&lt;SPAN&gt;", &lt;/SPAN&gt;&lt;SPAN class=""&gt;tradebooking_sgp=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;2024/12/27&lt;/SPAN&gt; &lt;SPAN class=""&gt;08:42:39.0000&lt;/SPAN&gt;&lt;SPAN&gt;", &lt;/SPAN&gt;&lt;SPAN class=""&gt;eventtime_sgp=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;2024/12/27&lt;/SPAN&gt; &lt;SPAN class=""&gt;08:42:33.6400&lt;/SPAN&gt;&lt;SPAN&gt;", &lt;/SPAN&gt;&lt;SPAN class=""&gt;sky_to_mq_latency=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;-5.-360&lt;/SPAN&gt;&lt;SPAN&gt;", &lt;/SPAN&gt;&lt;SPAN class=""&gt;portfolio_name=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;A&lt;/SPAN&gt; &lt;SPAN class=""&gt;ZZ&lt;/SPAN&gt; &lt;SPAN class=""&gt;AUD&lt;/SPAN&gt; &lt;SPAN class=""&gt;LTR&lt;/SPAN&gt;&lt;SPAN&gt;", &lt;/SPAN&gt;&lt;SPAN class=""&gt;portfolio_entity=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;ANZBG&lt;/SPAN&gt; &lt;SPAN class=""&gt;MELB&lt;/SPAN&gt;&lt;SPAN&gt;", &lt;/SPAN&gt;&lt;SPAN class=""&gt;trade_type=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;BasisSwap"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;31791027&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;SPAN class=""&gt;LIVE&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;SPAN class=""&gt;17500000.00000000&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;SPAN class=""&gt;AUD&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;SPAN class=""&gt;IRD&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;SPAN class=""&gt;IRS&lt;/SPAN&gt;&lt;SPAN&gt;;;&lt;/SPAN&gt;&lt;SPAN class=""&gt;A&lt;/SPAN&gt; &lt;SPAN class=""&gt;ZZ&lt;/SPAN&gt; &lt;SPAN class=""&gt;AUD&lt;/SPAN&gt; &lt;SPAN class=""&gt;LTR&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;SPAN class=""&gt;X_GCM_IRD_AUCNZ&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=sky sourcetype=sky_trade_murex_timestamp 
| rex field=_raw "trade_id=\"(?&amp;lt;trade_id&amp;gt;\d+)\"" 
| rex field=_raw "mx_status=\"(?&amp;lt;mx_status&amp;gt;[^\"]+)\""
| rex field=_raw "sky_id=\"(?&amp;lt;sky_id&amp;gt;\d+)\"" 
| rex field=_raw "event_id=\"(?&amp;lt;event_id&amp;gt;\d+)\""
| rex field=_raw "operation=\"(?&amp;lt;operation&amp;gt;[^\"]+)\""
| rex field=_raw "action=\"(?&amp;lt;action&amp;gt;[^\"]+)\""
| rex field=_raw "tradebooking_sgp=\"(?&amp;lt;tradebooking_sgp&amp;gt;[^\"]+)\""
| rex field=_raw "portfolio_name=\"(?&amp;lt;portfolio_name&amp;gt;[^\"]+)\""
| rex field=_raw "portfolio_entity=\"(?&amp;lt;portfolio_entity&amp;gt;[^\"]+)\""
| rex field=_raw "trade_type=\"(?&amp;lt;trade_type&amp;gt;[^\"]+)\""
| eval trade_id = replace(trade_id, "\"", "")
| rename trade_id as NB
| table sky_id, NB, event_id, mx_status, operation, action, tradebooking_sgp, portfolio_name, portfolio_entity, trade_type
| join type=left NB
[ search index=sky sourcetype=mx_to_sky
| rex field=_raw "(?&amp;lt;NB&amp;gt;[^;]+);(?&amp;lt;TRN_STATUS&amp;gt;[^;]+);(?&amp;lt;NOMINAL&amp;gt;[^;]+);(?&amp;lt;CURRENCY&amp;gt;[^;]+);(?&amp;lt;TRN_FMLY&amp;gt;[^;]+);(?&amp;lt;TRN_GRP&amp;gt;[^;]+);(?&amp;lt;TRN_TYPE&amp;gt;[^;]*);(?&amp;lt;BPFOLIO&amp;gt;[^;]*);(?&amp;lt;SPFOLIO&amp;gt;[^;]*)"
| table TRN_STATUS, NB, NOMINAL, CURRENCY, TRN_FMLY, TRN_GRP, TRN_TYPE, BPFOLIO, SPFOLIO]
| table sky_id, NB, event_id, mx_status, operation, action, tradebooking_sgp, portfolio_name, portfolio_entity, trade_type
| table sky_id, NB, event_id, mx_status, operation, action, tradebooking_sgp, portfolio_name, portfolio_entity, trade_type, TRN_STATUS, NOMINAL, CURRENCY, TRN_FMLY, TRN_GRP, TRN_TYPE, BPFOLIO, SPFOLIO&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For that NB i get all columns and empty for&amp;nbsp;TRN_STATUS, NOMINAL, CURRENCY, TRN_FMLY, TRN_GRP, TRN_TYPE, BPFOLIO, SPFOLIO&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Dec 2024 16:04:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-searches-on-common-columns/m-p/707637#M239326</guid>
      <dc:creator>siu</dc:creator>
      <dc:date>2024-12-27T16:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: Joining searches on common columns</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-searches-on-common-columns/m-p/707638#M239327</link>
      <description>&lt;P&gt;Subsearches are limited to 50,000 events which could account for the missing matches - try reducing the timeframes - do the matches appear then?&lt;/P&gt;</description>
      <pubDate>Fri, 27 Dec 2024 17:08:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-searches-on-common-columns/m-p/707638#M239327</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-12-27T17:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: Joining searches on common columns</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-searches-on-common-columns/m-p/707640#M239328</link>
      <description>&lt;P&gt;To be precise, because it's often missed by people, the 50k limit for subsearch only applies to join command. The general limit for subsearch results in other uses is 10k by default.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Dec 2024 19:47:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-searches-on-common-columns/m-p/707640#M239328</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-12-27T19:47:22Z</dc:date>
    </item>
    <item>
      <title>Re: Joining searches on common columns</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-searches-on-common-columns/m-p/707657#M239335</link>
      <description>&lt;P&gt;Thank you both, I need for &amp;gt;50k/&amp;gt;10k events&lt;BR /&gt;I am thinking of using appendcols but they are not able to join like this.&lt;BR /&gt;&lt;BR /&gt;Any other work around?&lt;BR /&gt;&lt;BR /&gt;both searches amass quite a huge number of events &amp;gt;50k &amp;gt;10k and I need to search for today which would be alot.&lt;/P&gt;</description>
      <pubDate>Sat, 28 Dec 2024 02:08:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-searches-on-common-columns/m-p/707657#M239335</guid>
      <dc:creator>siu</dc:creator>
      <dc:date>2024-12-28T02:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: Joining searches on common columns</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-searches-on-common-columns/m-p/707658#M239336</link>
      <description>&lt;P&gt;Hi all,&lt;BR /&gt;&lt;BR /&gt;this i get about&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;Running&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;4,003,400&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;of&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;4,003,400&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;events matched in&amp;nbsp; aday&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| join type=left NB
[ search index=sky sourcetype=mx_to_sky
| rex field=_raw "(?&amp;lt;NB&amp;gt;[^;]+);(?&amp;lt;TRN_STATUS&amp;gt;[^;]+);(?&amp;lt;NOMINAL&amp;gt;[^;]+);(?&amp;lt;CURRENCY&amp;gt;[^;]+);(?&amp;lt;TRN_FMLY&amp;gt;[^;]+);(?&amp;lt;TRN_GRP&amp;gt;[^;]+);(?&amp;lt;TRN_TYPE&amp;gt;[^;]*);(?&amp;lt;BPFOLIO&amp;gt;[^;]*);(?&amp;lt;SPFOLIO&amp;gt;[^;]*)"
| table TRN_STATUS, NB, NOMINAL, CURRENCY, TRN_FMLY, TRN_GRP, TRN_TYPE, BPFOLIO, SPFOLIO]
| table sky_id, NB, event_id, mx_status, operation, action, tradebooking_sgp, portfolio_name, portfolio_entity, trade_type
| table sky_id, NB, event_id, mx_status, operation, action, tradebooking_sgp, portfolio_name, portfolio_entity, trade_type, TRN_STATUS, NOMINAL, CURRENCY, TRN_FMLY, TRN_GRP, TRN_TYPE, BPFOLIO, SPFOLIO&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=sky sourcetype=mx_to_sky
| rex field=_raw "(?&amp;lt;NB&amp;gt;[^;]+);(?&amp;lt;TRN_STATUS&amp;gt;[^;]+);(?&amp;lt;NOMINAL&amp;gt;[^;]+);(?&amp;lt;CURRENCY&amp;gt;[^;]+);(?&amp;lt;TRN_FMLY&amp;gt;[^;]+);(?&amp;lt;TRN_GRP&amp;gt;[^;]+);(?&amp;lt;TRN_TYPE&amp;gt;[^;]*);(?&amp;lt;BPFOLIO&amp;gt;[^;]*);(?&amp;lt;SPFOLIO&amp;gt;[^;]*)"
| table TRN_STATUS, NB, NOMINAL, CURRENCY, TRN_FMLY, TRN_GRP, TRN_TYPE, BPFOLIO, SPFOLIO&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This below i get about&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;1,065,810&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;events in a day&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 28 Dec 2024 04:27:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-searches-on-common-columns/m-p/707658#M239336</guid>
      <dc:creator>siu</dc:creator>
      <dc:date>2024-12-28T04:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: Joining searches on common columns</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-searches-on-common-columns/m-p/707661#M239337</link>
      <description>&lt;P&gt;As has been said here many times, it is best to avoid using join - this is a classic case of why join should be avoided.&lt;/P&gt;&lt;P&gt;Try something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=sky sourcetype=sky_trade_murex_timestamp OR sourcetype=mx_to_sky
``` Parse sky_trade_murex_timestamp events (note that trade_id is put directly into the NB field) ```
| rex field=_raw "trade_id=\"(?&amp;lt;NB&amp;gt;\d+)\"" 
| rex field=_raw "mx_status=\"(?&amp;lt;mx_status&amp;gt;[^\"]+)\""
| rex field=_raw "sky_id=\"(?&amp;lt;sky_id&amp;gt;\d+)\"" 
| rex field=_raw "event_id=\"(?&amp;lt;event_id&amp;gt;\d+)\""
| rex field=_raw "operation=\"(?&amp;lt;operation&amp;gt;[^\"]+)\""
| rex field=_raw "action=\"(?&amp;lt;action&amp;gt;[^\"]+)\""
| rex field=_raw "tradebooking_sgp=\"(?&amp;lt;tradebooking_sgp&amp;gt;[^\"]+)\""
| rex field=_raw "portfolio_name=\"(?&amp;lt;portfolio_name&amp;gt;[^\"]+)\""
| rex field=_raw "portfolio_entity=\"(?&amp;lt;portfolio_entity&amp;gt;[^\"]+)\""
| rex field=_raw "trade_type=\"(?&amp;lt;trade_type&amp;gt;[^\"]+)\""
``` Parse mx_to_sky events ```
| rex field=_raw "(?&amp;lt;NB&amp;gt;[^;]+);(?&amp;lt;TRN_STATUS&amp;gt;[^;]+);(?&amp;lt;NOMINAL&amp;gt;[^;]+);(?&amp;lt;CURRENCY&amp;gt;[^;]+);(?&amp;lt;TRN_FMLY&amp;gt;[^;]+);(?&amp;lt;TRN_GRP&amp;gt;[^;]+);(?&amp;lt;TRN_TYPE&amp;gt;[^;]*);(?&amp;lt;BPFOLIO&amp;gt;[^;]*);(?&amp;lt;SPFOLIO&amp;gt;[^;]*)"
``` Reduce to just the fields of interest ```
| table sky_id, NB, event_id, mx_status, operation, action, tradebooking_sgp, portfolio_name, portfolio_entity, trade_type, TRN_STATUS, NOMINAL, CURRENCY, TRN_FMLY, TRN_GRP, TRN_TYPE, BPFOLIO, SPFOLIO
``` "Join" events by NB using stats ```
| stats values(*) as * by NB&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 28 Dec 2024 09:04:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-searches-on-common-columns/m-p/707661#M239337</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-12-28T09:04:16Z</dc:date>
    </item>
    <item>
      <title>Re: Joining searches on common columns</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-searches-on-common-columns/m-p/707667#M239339</link>
      <description>&lt;P&gt;ah yes i removed those and the search continued. But it was so laggy as there were many events, i did not get a proper search result without it hanging&lt;/P&gt;</description>
      <pubDate>Sat, 28 Dec 2024 16:03:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-searches-on-common-columns/m-p/707667#M239339</guid>
      <dc:creator>siu</dc:creator>
      <dc:date>2024-12-28T16:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: Joining searches on common columns</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-searches-on-common-columns/m-p/707668#M239340</link>
      <description>&lt;P&gt;im gonna try this thanks!!&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I think i got something like all the results into one row and performance is very bad as there are many events i did not manage to get a proper search result&lt;/P&gt;</description>
      <pubDate>Sat, 28 Dec 2024 16:20:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-searches-on-common-columns/m-p/707668#M239340</guid>
      <dc:creator>siu</dc:creator>
      <dc:date>2024-12-28T16:20:38Z</dc:date>
    </item>
    <item>
      <title>Re: Joining searches on common columns</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-searches-on-common-columns/m-p/707673#M239342</link>
      <description>&lt;P&gt;Try replacing the table command with fields&lt;/P&gt;</description>
      <pubDate>Sat, 28 Dec 2024 18:52:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-searches-on-common-columns/m-p/707673#M239342</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-12-28T18:52:13Z</dc:date>
    </item>
    <item>
      <title>Re: Joining searches on common columns</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-searches-on-common-columns/m-p/707678#M239344</link>
      <description>&lt;P&gt;thanks! Yep i tried that for just an hour range. I got one single row of data with everything in there it seems. I also couldnt scroll the page to confirm as page became unresponsive&lt;/P&gt;</description>
      <pubDate>Sun, 29 Dec 2024 02:10:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-searches-on-common-columns/m-p/707678#M239344</guid>
      <dc:creator>siu</dc:creator>
      <dc:date>2024-12-29T02:10:24Z</dc:date>
    </item>
  </channel>
</rss>

