<?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: avoiding joins with rexed fields and unmatched fieldnames in the sources: in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/avoiding-joins-with-rexed-fields-and-unmatched-fieldnames-in-the/m-p/550103#M156104</link>
    <description>&lt;P&gt;Assuming that fields in one search do not appear in the other search, and that&amp;nbsp;&lt;SPAN&gt;u_corresponding_ritm_number/request_item is unique, you could try something like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(search one OR search two)
| rex field=horrible_field "#50\s+\-\s+(?P&amp;lt;business_justification&amp;gt;.+?)\s+\-\sBusiness\sCase"
| eval u_corresponding_ritm_number=coalesce(u_corresponding_ritm_number,request_item)
| eventstats latest(business_justification) as  business_justification latest(dv_comments_and_work_notes) as dv_comments_and_work_notes by u_corresponding_ritm_number
| stats latest(u_subscription_type) latest(sys_created_on) latest(dv_u_expiration_date) latest(dv_sys_updated_on) latest(u_status) latest(u_corresponding_ritm_number) latest(dv_u_corresponding_ritm_number) latest(business_justification) latest(dv_comments_and_work_notes) by dv_u_info,dv_u_sso,u_logonid
| `rename(latest)`
| eval record_updated=strptime(dv_sys_updated_on,"%Y-%m-%d %H:%M:%S"),record_created=strptime(sys_created_on,"%Y-%m-%d %H:%M:%S"),record_expires=strptime(dv_u_expiration_date, "%Y-%m-%d"),now=now()
| eval USBViolation=if(now &amp;gt; record_expires, "yes", "no")
| fields - now,record_created,record_exires,record_updated,record_expires&lt;/LI-CODE&gt;</description>
    <pubDate>Sat, 01 May 2021 09:11:04 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2021-05-01T09:11:04Z</dc:date>
    <item>
      <title>avoiding joins with rexed fields and unmatched fieldnames in the sources:</title>
      <link>https://community.splunk.com/t5/Splunk-Search/avoiding-joins-with-rexed-fields-and-unmatched-fieldnames-in-the/m-p/550084#M156097</link>
      <description>&lt;P&gt;I would love a little guidance on how I could improve this search by getting away from Join.&amp;nbsp; I think I am hitting some result limits in doing so, but I could not get the same results using appendcols:&amp;nbsp; I've also tried putting (sourctype=mysourcetype OR source=my_other_source) and renaming the field in the other source to match the field in the first source but that didn't work either.&lt;/P&gt;&lt;P&gt;...| stats latest(u_subscription_type) latest(sys_created_on) latest(dv_u_expiration_date) latest(dv_sys_updated_on) latest(u_status) latest(u_corresponding_ritm_number) latest(dv_u_corresponding_ritm_number) by dv_u_info,dv_u_sso,u_logonid&lt;BR /&gt;| `rename(latest)`&lt;BR /&gt;| eval record_updated=strptime(dv_sys_updated_on,"%Y-%m-%d %H:%M:%S"),record_created=strptime(sys_created_on,"%Y-%m-%d %H:%M:%S"),record_expires=strptime(dv_u_expiration_date, "%Y-%m-%d"),now=now()&lt;BR /&gt;| eval USBViolation=if(now &amp;gt; record_expires, "yes", "no")&lt;BR /&gt;| join type=left&lt;BR /&gt;[ search (source=my_other_source)&lt;BR /&gt;| rex field=horrible_field "#50\s+\-\s+(?P&amp;lt;business_justification&amp;gt;.+?)\s+\-\sBusiness\sCase"&lt;BR /&gt;| eval u_corresponding_ritm_number=request_item&lt;BR /&gt;|stats latest(business_justification) latest(dv_comments_and_work_notes) by u_corresponding_ritm_number&lt;BR /&gt;| `rename(latest)`]&lt;BR /&gt;| fields - now,record_created,record_exires,record_updated,record_expires&lt;/P&gt;</description>
      <pubDate>Fri, 30 Apr 2021 20:49:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/avoiding-joins-with-rexed-fields-and-unmatched-fieldnames-in-the/m-p/550084#M156097</guid>
      <dc:creator>mjones414</dc:creator>
      <dc:date>2021-04-30T20:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: avoiding joins with rexed fields and unmatched fieldnames in the sources:</title>
      <link>https://community.splunk.com/t5/Splunk-Search/avoiding-joins-with-rexed-fields-and-unmatched-fieldnames-in-the/m-p/550103#M156104</link>
      <description>&lt;P&gt;Assuming that fields in one search do not appear in the other search, and that&amp;nbsp;&lt;SPAN&gt;u_corresponding_ritm_number/request_item is unique, you could try something like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(search one OR search two)
| rex field=horrible_field "#50\s+\-\s+(?P&amp;lt;business_justification&amp;gt;.+?)\s+\-\sBusiness\sCase"
| eval u_corresponding_ritm_number=coalesce(u_corresponding_ritm_number,request_item)
| eventstats latest(business_justification) as  business_justification latest(dv_comments_and_work_notes) as dv_comments_and_work_notes by u_corresponding_ritm_number
| stats latest(u_subscription_type) latest(sys_created_on) latest(dv_u_expiration_date) latest(dv_sys_updated_on) latest(u_status) latest(u_corresponding_ritm_number) latest(dv_u_corresponding_ritm_number) latest(business_justification) latest(dv_comments_and_work_notes) by dv_u_info,dv_u_sso,u_logonid
| `rename(latest)`
| eval record_updated=strptime(dv_sys_updated_on,"%Y-%m-%d %H:%M:%S"),record_created=strptime(sys_created_on,"%Y-%m-%d %H:%M:%S"),record_expires=strptime(dv_u_expiration_date, "%Y-%m-%d"),now=now()
| eval USBViolation=if(now &amp;gt; record_expires, "yes", "no")
| fields - now,record_created,record_exires,record_updated,record_expires&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 01 May 2021 09:11:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/avoiding-joins-with-rexed-fields-and-unmatched-fieldnames-in-the/m-p/550103#M156104</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-05-01T09:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: avoiding joins with rexed fields and unmatched fieldnames in the sources:</title>
      <link>https://community.splunk.com/t5/Splunk-Search/avoiding-joins-with-rexed-fields-and-unmatched-fieldnames-in-the/m-p/550129#M156116</link>
      <description>&lt;P&gt;This is awesome, I completely forgot about eventstats!&amp;nbsp; Thanks for this great example of getting past join limitations!&lt;/P&gt;</description>
      <pubDate>Sun, 02 May 2021 00:42:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/avoiding-joins-with-rexed-fields-and-unmatched-fieldnames-in-the/m-p/550129#M156116</guid>
      <dc:creator>mjones414</dc:creator>
      <dc:date>2021-05-02T00:42:36Z</dc:date>
    </item>
  </channel>
</rss>

