<?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: two search queries with join not working in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/two-search-queries-with-join-not-working/m-p/576171#M200785</link>
    <description>&lt;P&gt;I need to sum-up the count from second query(both event for claim table field count: 20000 + 20000) and compare with the field&amp;nbsp;&lt;SPAN&gt;s_total_count:324101 from first query and post the difference.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Which is not happening&amp;nbsp;.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 24 Nov 2021 11:57:52 GMT</pubDate>
    <dc:creator>lovelyshrm421</dc:creator>
    <dc:date>2021-11-24T11:57:52Z</dc:date>
    <item>
      <title>two search queries with join not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/two-search-queries-with-join-not-working/m-p/575863#M200675</link>
      <description>&lt;P&gt;I have two separate search queries which are working separately but when i am trying to get data by joining them its not giving me any result from second query.&lt;/P&gt;&lt;P&gt;first query-&amp;nbsp;&lt;/P&gt;&lt;P&gt;index=ads sourcetype="sequel"&lt;BR /&gt;| eval jobname="Job for p1"&lt;BR /&gt;| rex field=_raw "schema:(?P&amp;lt;db&amp;gt;[^ ]+)"&lt;BR /&gt;| rex field=_raw "table:(?P&amp;lt;tb&amp;gt;[^ ]+)"&lt;BR /&gt;| rex field=_raw "s_total_count:(?P&amp;lt;cnts&amp;gt;[^ ]+)"&lt;BR /&gt;| rex field=_raw "origin_cnt_date:(?P&amp;lt;dte&amp;gt;[\D]+[\d]+[ ][\d]+[:]+[\d]+[:]+[\d]+[ ][\D]+[\d]+)"&lt;BR /&gt;| eval date= strptime(dte, "%a %B %d %H:%M:%S")&lt;BR /&gt;| eval dates=strftime(date, "%Y-%m-%d")&lt;BR /&gt;| fields db tb cnts dates jobname&lt;BR /&gt;| where cnts&amp;gt;0&lt;BR /&gt;| table dates jobname db tb cnts&lt;/P&gt;&lt;P&gt;second query-&lt;/P&gt;&lt;P&gt;index=ads sourcetype="isosequel"&lt;BR /&gt;| rex field=_raw "schema:(?P&amp;lt;db&amp;gt;[^ ]+)"&lt;BR /&gt;| rex field=_raw "table:(?P&amp;lt;tb&amp;gt;[^ ]+)"&lt;BR /&gt;| rex field=_raw "count:(?P&amp;lt;cnt&amp;gt;[^ ]+)"&lt;BR /&gt;| eval jobname1="Job for p2"&lt;BR /&gt;| stats sum(cnt) as tb_cnt by jobname1 db tb&lt;BR /&gt;| fields jobname1 db tb tb_cnt&lt;BR /&gt;|table jobname1 db tb tb_cnt&lt;/P&gt;&lt;P&gt;joined query(not working as expected)-&lt;/P&gt;&lt;P&gt;index=ads sourcetype="sequel"&lt;BR /&gt;| eval jobname="Job for p1"&lt;BR /&gt;| rex field=_raw "schema:(?P&amp;lt;db&amp;gt;[^ ]+)"&lt;BR /&gt;| rex field=_raw "table:(?P&amp;lt;tb&amp;gt;[^ ]+)"&lt;BR /&gt;| rex field=_raw "s_total_count:(?P&amp;lt;cnts&amp;gt;[^ ]+)"&lt;BR /&gt;| rex field=_raw "origin_cnt_date:(?P&amp;lt;dte&amp;gt;[\D]+[\d]+[ ][\d]+[:]+[\d]+[:]+[\d]+[ ][\D]+[\d]+)"&lt;BR /&gt;| eval date= strptime(dte, "%a %B %d %H:%M:%S")&lt;BR /&gt;| eval dates=strftime(date, "%Y-%m-%d")&lt;BR /&gt;| fields db, tb, cnts, dates, jobname&lt;BR /&gt;| join type=inner db tb&lt;BR /&gt;[ search(index=ads sourcetype="isosequel")&lt;BR /&gt;| rex field=_raw "schema:(?P&amp;lt;db&amp;gt;[^ ]+)"&lt;BR /&gt;| rex field=_raw "table:(?P&amp;lt;tb&amp;gt;[^ ]+)"&lt;BR /&gt;| rex field=_raw "count:(?P&amp;lt;cnt&amp;gt;[^ ]+)"&lt;BR /&gt;| rex field=_raw "jobname:Job for (?P&amp;lt;jb&amp;gt;[a-z_A-Z0-9]+)"&lt;BR /&gt;| stats sum(cnt) as tb_cnt by jb db tb&lt;BR /&gt;| fields db, tb, tb_cnt, jb]&lt;BR /&gt;| eval diff = cnts-tb_cnt&lt;BR /&gt;| table dates, jobname, jb, db, tb, cnts, tb_cnt, diff&lt;/P&gt;&lt;P&gt;requirement- I want to compare each db ,table with the second query db, table and get the difference, but i am not getting any result out of second query. any help would be appreciated !!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thankyou in Advance !!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Nov 2021 08:01:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/two-search-queries-with-join-not-working/m-p/575863#M200675</guid>
      <dc:creator>lovelyshrm421</dc:creator>
      <dc:date>2021-11-23T08:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: two search queries with join not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/two-search-queries-with-join-not-working/m-p/575873#M200682</link>
      <description>&lt;P&gt;You have changed the way you determine jobname - is it possible that&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=_raw "jobname:Job for (?P&amp;lt;jb&amp;gt;[a-z_A-Z0-9]+)"&lt;/LI-CODE&gt;&lt;P&gt;is returning no values for jb (which would mean the subsequent stats by jb would have zero results)?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Nov 2021 13:54:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/two-search-queries-with-join-not-working/m-p/575873#M200682</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-11-22T13:54:50Z</dc:date>
    </item>
    <item>
      <title>Re: two search queries with join not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/two-search-queries-with-join-not-working/m-p/575877#M200683</link>
      <description>&lt;P&gt;Even i tried&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;SPAN&gt;| eval jobname1="Job for p2"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;as well .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;its same actually. no results&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Nov 2021 08:00:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/two-search-queries-with-join-not-working/m-p/575877#M200683</guid>
      <dc:creator>lovelyshrm421</dc:creator>
      <dc:date>2021-11-23T08:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: two search queries with join not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/two-search-queries-with-join-not-working/m-p/575883#M200684</link>
      <description>&lt;P&gt;Can you share some sample events from the two searches?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Nov 2021 14:34:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/two-search-queries-with-join-not-working/m-p/575883#M200684</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-11-22T14:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: two search queries with join not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/two-search-queries-with-join-not-working/m-p/575977#M200720</link>
      <description>&lt;P&gt;first query event- in the below event we are getting count directly in field-&amp;nbsp;&lt;SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;s_total_count:2.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://nationwide.splunkcloud.com/en-US/app/search/search?q=search%20index%3Dads%20sourcetype%3D%22sequel%22%20jb_name%3D%22Job%20for%20pcds_iso_load_balancing_Splunk_1table%22&amp;amp;display.page.search.mode=fast&amp;amp;dispatch.sample_ratio=1&amp;amp;earliest=-4h%40m&amp;amp;latest=now&amp;amp;sid=1637650985.12707_67DF8B54-6007-4D1F-A992-535963323F98#" target="_blank" rel="noopener"&gt;[-]&lt;/A&gt;&lt;SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;jb_name&lt;/SPAN&gt;:&amp;nbsp;&lt;SPAN class=""&gt;Job for p1&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;message&lt;/SPAN&gt;:&amp;nbsp;&lt;SPAN class=""&gt;database:local_db schema:dbo table:claim count:1 queue:-1 pipelineuser:l@gmail.com jobname:Job for p1 pk_field:id s_pk_count:2 s_total_count:324101 origin_cnt_date:Tue Nov 23 06:57:49 GMT 2021&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;severity&lt;/SPAN&gt;:&amp;nbsp;&lt;SPAN class=""&gt;INFO&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;time&lt;/SPAN&gt;:&amp;nbsp;&lt;SPAN class=""&gt;1637650742&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Second query-&amp;nbsp; this below query getting the count in the field&amp;nbsp;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;count:20000 and having multiple events for one table per batch wise, so we need to sum up all the event for the table and compare the count with the first query count and see the difference.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;event1:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;{&amp;nbsp;&lt;A href="https://nationwide.splunkcloud.com/en-US/app/search/search?q=search%20index%3Dads%20sourcetype%3D%22isosequel%22%20jb_name%3D%22Job%20for%20pcds_iso_raw_trunc_p4_splunk%22&amp;amp;display.page.search.mode=fast&amp;amp;dispatch.sample_ratio=1&amp;amp;earliest=-4h%40m&amp;amp;latest=now&amp;amp;sid=1637650981.12706_67DF8B54-6007-4D1F-A992-535963323F98#" target="_blank" rel="noopener"&gt;[-]&lt;/A&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;jb_name&lt;/SPAN&gt;:&amp;nbsp;&lt;SPAN class=""&gt;Job for p2&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;message&lt;/SPAN&gt;:&amp;nbsp;&lt;SPAN class=""&gt;database:local_db schema:dbo table:Claim count:20000 queue:-1 pipelineuser:l@gmail.com jobname:Job for p2&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;severity&lt;/SPAN&gt;:&amp;nbsp;&lt;SPAN class=""&gt;INFO&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;time&lt;/SPAN&gt;:&amp;nbsp;&lt;SPAN class=""&gt;1637650935&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;event2:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;{&amp;nbsp;&lt;A href="https://nationwide.splunkcloud.com/en-US/app/search/search?q=search%20index%3Dads%20sourcetype%3D%22isosequel%22%20jb_name%3D%22Job%20for%20pcds_iso_raw_trunc_p4_splunk%22&amp;amp;display.page.search.mode=fast&amp;amp;dispatch.sample_ratio=1&amp;amp;earliest=-4h%40m&amp;amp;latest=now&amp;amp;sid=1637650981.12706_67DF8B54-6007-4D1F-A992-535963323F98#" target="_blank" rel="noopener"&gt;[-]&lt;/A&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;jb_name&lt;/SPAN&gt;:&amp;nbsp;&lt;SPAN class=""&gt;Job for p2&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;message&lt;/SPAN&gt;:&amp;nbsp;&lt;SPAN class=""&gt;database:local_db schema:dbo table:Claim count:20000 queue:-1 pipelineuser:l@gmail.com jobname:Job for p2&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;severity&lt;/SPAN&gt;:&amp;nbsp;&lt;SPAN class=""&gt;INFO&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;time&lt;/SPAN&gt;:&amp;nbsp;&lt;SPAN class=""&gt;1637650875&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;}&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Nov 2021 08:53:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/two-search-queries-with-join-not-working/m-p/575977#M200720</guid>
      <dc:creator>lovelyshrm421</dc:creator>
      <dc:date>2021-11-23T08:53:40Z</dc:date>
    </item>
    <item>
      <title>Re: two search queries with join not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/two-search-queries-with-join-not-working/m-p/575987#M200726</link>
      <description>&lt;P&gt;In the first event, your table name is liabilitytype, and in the second set of events, it is Claim. This is why the join is returning zero events&lt;/P&gt;</description>
      <pubDate>Tue, 23 Nov 2021 08:42:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/two-search-queries-with-join-not-working/m-p/575987#M200726</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-11-23T08:42:08Z</dc:date>
    </item>
    <item>
      <title>Re: two search queries with join not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/two-search-queries-with-join-not-working/m-p/575990#M200728</link>
      <description>&lt;P&gt;We have all the table event available in first query. now check the event info i edited.&lt;/P&gt;&lt;P&gt;I am thinking something wrong with the join i am using its not able to calculate the count from second query.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Nov 2021 08:56:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/two-search-queries-with-join-not-working/m-p/575990#M200728</guid>
      <dc:creator>lovelyshrm421</dc:creator>
      <dc:date>2021-11-23T08:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: two search queries with join not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/two-search-queries-with-join-not-working/m-p/575993#M200730</link>
      <description>&lt;P&gt;I am confused as to what you think is wrong - the search is summing the counts in the second set of events - 20000 + 20000 = 40000 and you are comparing this to the count from the field in the first event - 2&lt;/P&gt;&lt;P&gt;Instead of summing the counts in the second set of events, should you be counting the events - 2?&lt;/P&gt;</description>
      <pubDate>Tue, 23 Nov 2021 09:12:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/two-search-queries-with-join-not-working/m-p/575993#M200730</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-11-23T09:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: two search queries with join not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/two-search-queries-with-join-not-working/m-p/576171#M200785</link>
      <description>&lt;P&gt;I need to sum-up the count from second query(both event for claim table field count: 20000 + 20000) and compare with the field&amp;nbsp;&lt;SPAN&gt;s_total_count:324101 from first query and post the difference.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Which is not happening&amp;nbsp;.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 11:57:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/two-search-queries-with-join-not-working/m-p/576171#M200785</guid>
      <dc:creator>lovelyshrm421</dc:creator>
      <dc:date>2021-11-24T11:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: two search queries with join not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/two-search-queries-with-join-not-working/m-p/576174#M200786</link>
      <description>&lt;P&gt;Try changing&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats sum(cnt) as tb_cnt by jb db tb&lt;/LI-CODE&gt;&lt;P&gt;to&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats sum(cnt) as tb_cnt values(jb) as jb by db tb&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 24 Nov 2021 12:17:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/two-search-queries-with-join-not-working/m-p/576174#M200786</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-11-24T12:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: two search queries with join not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/two-search-queries-with-join-not-working/m-p/576175#M200787</link>
      <description>&lt;P&gt;I changed to&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;| stats sum(cnt) as tb_cnt values(jb) as jb by db tb&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but still no results from second query.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 12:42:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/two-search-queries-with-join-not-working/m-p/576175#M200787</guid>
      <dc:creator>lovelyshrm421</dc:creator>
      <dc:date>2021-11-24T12:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: two search queries with join not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/two-search-queries-with-join-not-working/m-p/576176#M200788</link>
      <description>&lt;P&gt;The events look like they might be in JSON format - can you share the raw events (rather than the formatted events)? Also, have you considered using spath to retrieve the fields?&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 12:47:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/two-search-queries-with-join-not-working/m-p/576176#M200788</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-11-24T12:47:46Z</dc:date>
    </item>
    <item>
      <title>Re: two search queries with join not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/two-search-queries-with-join-not-working/m-p/576178#M200790</link>
      <description>&lt;P&gt;Event for first query- table -claim&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;{"&lt;/SPAN&gt;&lt;SPAN class=""&gt;severity&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt;&lt;SPAN&gt; "&lt;/SPAN&gt;&lt;SPAN class=""&gt;INFO&lt;/SPAN&gt;&lt;SPAN&gt;", "&lt;/SPAN&gt;&lt;SPAN class=""&gt;message&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt;&lt;SPAN&gt; "&lt;/SPAN&gt;&lt;SPAN class=""&gt;database:local_db&lt;/SPAN&gt; &lt;SPAN class=""&gt;schema:dbo&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;table:claim&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;count:1&lt;/SPAN&gt; &lt;SPAN class=""&gt;queue:-1&lt;/SPAN&gt; &lt;SPAN class=""&gt;pipelineuser:l@gmail.com&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class=""&gt;jobname:Job&lt;/SPAN&gt; &lt;SPAN class=""&gt;for&lt;/SPAN&gt; &lt;SPAN class=""&gt;p1&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class=""&gt;pk_field:id&lt;/SPAN&gt; &lt;SPAN class=""&gt;s_pk_count:324203&lt;/SPAN&gt; &lt;SPAN class=""&gt;\ts_total_count:324203&lt;/SPAN&gt; &lt;SPAN class=""&gt;origin_cnt_date:Wed&lt;/SPAN&gt; &lt;SPAN class=""&gt;Nov&lt;/SPAN&gt; &lt;SPAN class=""&gt;24&lt;/SPAN&gt; &lt;SPAN class=""&gt;11:04:31&lt;/SPAN&gt; &lt;SPAN class=""&gt;GMT&lt;/SPAN&gt; &lt;SPAN class=""&gt;2021&lt;/SPAN&gt;&lt;SPAN&gt;", "&lt;/SPAN&gt;&lt;SPAN class=""&gt;jb_name&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt;&lt;SPAN&gt; "&lt;/SPAN&gt;&lt;SPAN class=""&gt;Job&lt;/SPAN&gt; &lt;SPAN class=""&gt;for&lt;/SPAN&gt; &lt;SPAN class=""&gt;p1&lt;/SPAN&gt;&lt;SPAN&gt;", "&lt;/SPAN&gt;&lt;SPAN class=""&gt;time&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;1637751926}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Events for second query- table- claim&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;{"&lt;/SPAN&gt;severity&lt;SPAN&gt;"&lt;/SPAN&gt;:&lt;SPAN&gt; "&lt;/SPAN&gt;INFO&lt;SPAN&gt;", "&lt;/SPAN&gt;message&lt;SPAN&gt;"&lt;/SPAN&gt;:&lt;SPAN&gt; "&lt;/SPAN&gt;database:local_db schema:dbo &lt;SPAN class=""&gt;table:Claim&lt;/SPAN&gt; count:20000 queue:-1 pipelineuser:l@gmail.com&amp;nbsp;jobname:Job for p2&lt;SPAN&gt;", "&lt;/SPAN&gt;jb_name&lt;SPAN&gt;"&lt;/SPAN&gt;:&lt;SPAN&gt; "&lt;/SPAN&gt;Job for p2&lt;SPAN&gt;", "&lt;/SPAN&gt;time&lt;SPAN&gt;"&lt;/SPAN&gt;: 1637752834}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;{"&lt;/SPAN&gt;severity&lt;SPAN&gt;"&lt;/SPAN&gt;:&lt;SPAN&gt; "&lt;/SPAN&gt;INFO&lt;SPAN&gt;", "&lt;/SPAN&gt;message&lt;SPAN&gt;"&lt;/SPAN&gt;:&lt;SPAN&gt; "&lt;/SPAN&gt;database:local_db schema:dbo &lt;SPAN class=""&gt;table:Claim&lt;/SPAN&gt; count:20000 queue:-1 pipelineuser:l@gmail.com&amp;nbsp;jobname:Job for p2&lt;SPAN&gt;", "&lt;/SPAN&gt;jb_name&lt;SPAN&gt;"&lt;/SPAN&gt;:&lt;SPAN&gt; "&lt;/SPAN&gt;Job for p2&lt;SPAN&gt;", "&lt;/SPAN&gt;time&lt;SPAN&gt;"&lt;/SPAN&gt;: 1637752776}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;have you considered using spath to retrieve the fields? No i haven't tried yet.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 13:08:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/two-search-queries-with-join-not-working/m-p/576178#M200790</guid>
      <dc:creator>lovelyshrm421</dc:creator>
      <dc:date>2021-11-24T13:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: two search queries with join not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/two-search-queries-with-join-not-working/m-p/576206#M200806</link>
      <description>&lt;P&gt;Never mind about the spath - I didn't realise that most of the information is taken from the message field&lt;/P&gt;&lt;P&gt;Your search appears to work with the data you shared (apart from I "corrected" claim to Claim in the table name as the join is case-sensitive)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval _raw="{\"severity\": \"INFO\", \"message\": \"database:local_db schema:dbo table:Claim count:1 queue:-1 pipelineuser:l@gmail.com jobname:Job for p1 pk_field:id s_pk_count:324203 \ts_total_count:324203 origin_cnt_date:Wed Nov 24 11:04:31 GMT 2021\", \"jb_name\": \"Job for p1\", \"time\": 1637751926}"
| eval jobname="Job for p1"
| rex field=_raw "schema:(?P&amp;lt;db&amp;gt;[^ ]+)"
| rex field=_raw "table:(?P&amp;lt;tb&amp;gt;[^ ]+)"
| rex field=_raw "s_total_count:(?P&amp;lt;cnts&amp;gt;[^ ]+)"
| rex field=_raw "origin_cnt_date:(?P&amp;lt;dte&amp;gt;[\D]+[\d]+[ ][\d]+[:]+[\d]+[:]+[\d]+[ ][\D]+[\d]+)"
| eval date= strptime(dte, "%a %B %d %H:%M:%S")
| eval dates=strftime(date, "%Y-%m-%d")
| fields db, tb, cnts, dates, jobname
| join type=left db tb
    [| makeresults
    | eval _raw="{\"severity\": \"INFO\", \"message\": \"database:local_db schema:dbo table:Claim count:20000 queue:-1 pipelineuser:l@gmail.com jobname:Job for p2\", \"jb_name\": \"Job for p2\", \"time\": 1637752834}"
    | append
        [| makeresults
        | eval _raw="{\"severity\": \"INFO\", \"message\": \"database:local_db schema:dbo table:Claim count:20000 queue:-1 pipelineuser:l@gmail.com jobname:Job for p2\", \"jb_name\": \"Job for p2\", \"time\": 1637752776}"
        ]
    | rex field=_raw "schema:(?P&amp;lt;db&amp;gt;[^ ]+)"
    | rex field=_raw "table:(?P&amp;lt;tb&amp;gt;[^ ]+)"
    | rex field=_raw "count:(?P&amp;lt;cnt&amp;gt;[^ ]+)"
    | rex field=_raw "jobname:Job for (?P&amp;lt;jb&amp;gt;[a-z_A-Z0-9]+)"
    | stats sum(cnt) as tb_cnt by jb db tb
    | fields db, tb, tb_cnt, jb]
| eval diff = cnts-tb_cnt
| table dates, jobname, jb, db, tb, cnts, tb_cnt, diff&lt;/LI-CODE&gt;&lt;P&gt;So perhaps there is something different about your real data?&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 15:22:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/two-search-queries-with-join-not-working/m-p/576206#M200806</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-11-24T15:22:44Z</dc:date>
    </item>
    <item>
      <title>Re: two search queries with join not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/two-search-queries-with-join-not-working/m-p/576224#M200816</link>
      <description>&lt;P&gt;Yes, Exactly I have observed that from first query events are like table name -all small case, and from second query&amp;nbsp; table name is in mix case(upper +lower), so is there a way we can change the case(to_lower) before comparing the table and db?&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 17:59:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/two-search-queries-with-join-not-working/m-p/576224#M200816</guid>
      <dc:creator>lovelyshrm421</dc:creator>
      <dc:date>2021-11-24T17:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: two search queries with join not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/two-search-queries-with-join-not-working/m-p/576230#M200820</link>
      <description>&lt;P&gt;Force them both to lower case&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval _raw="{\"severity\": \"INFO\", \"message\": \"database:local_db schema:dbo table:claim count:1 queue:-1 pipelineuser:l@gmail.com jobname:Job for p1 pk_field:id s_pk_count:324203 \ts_total_count:324203 origin_cnt_date:Wed Nov 24 11:04:31 GMT 2021\", \"jb_name\": \"Job for p1\", \"time\": 1637751926}"
| eval jobname="Job for p1"
| rex field=_raw "schema:(?P&amp;lt;db&amp;gt;[^ ]+)"
| rex field=_raw "table:(?P&amp;lt;tb&amp;gt;[^ ]+)"
| eval tb=lower(tb)
| rex field=_raw "s_total_count:(?P&amp;lt;cnts&amp;gt;[^ ]+)"
| rex field=_raw "origin_cnt_date:(?P&amp;lt;dte&amp;gt;[\D]+[\d]+[ ][\d]+[:]+[\d]+[:]+[\d]+[ ][\D]+[\d]+)"
| eval date= strptime(dte, "%a %B %d %H:%M:%S")
| eval dates=strftime(date, "%Y-%m-%d")
| fields db, tb, cnts, dates, jobname
| join type=left db tb
    [| makeresults
    | eval _raw="{\"severity\": \"INFO\", \"message\": \"database:local_db schema:dbo table:Claim count:20000 queue:-1 pipelineuser:l@gmail.com jobname:Job for p2\", \"jb_name\": \"Job for p2\", \"time\": 1637752834}"
    | append
        [| makeresults
        | eval _raw="{\"severity\": \"INFO\", \"message\": \"database:local_db schema:dbo table:Claim count:20000 queue:-1 pipelineuser:l@gmail.com jobname:Job for p2\", \"jb_name\": \"Job for p2\", \"time\": 1637752776}"
        ]
    | rex field=_raw "schema:(?P&amp;lt;db&amp;gt;[^ ]+)"
    | rex field=_raw "table:(?P&amp;lt;tb&amp;gt;[^ ]+)"
    | eval tb=lower(tb)
    | rex field=_raw "count:(?P&amp;lt;cnt&amp;gt;[^ ]+)"
    | rex field=_raw "jobname:Job for (?P&amp;lt;jb&amp;gt;[a-z_A-Z0-9]+)"
    | stats sum(cnt) as tb_cnt by jb db tb
    | fields db, tb, tb_cnt, jb]
| eval diff = cnts-tb_cnt
| table dates, jobname, jb, db, tb, cnts, tb_cnt, diff&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 24 Nov 2021 18:51:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/two-search-queries-with-join-not-working/m-p/576230#M200820</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-11-24T18:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: two search queries with join not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/two-search-queries-with-join-not-working/m-p/576241#M200829</link>
      <description>&lt;P&gt;This seems to be working. Perfect. Thanks alot. Great help.&lt;/P&gt;&lt;P&gt;But let me test out few more scenario's for this and if i face any issue will post here.&lt;/P&gt;&lt;P&gt;Thanks Again for helping &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 20:02:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/two-search-queries-with-join-not-working/m-p/576241#M200829</guid>
      <dc:creator>lovelyshrm421</dc:creator>
      <dc:date>2021-11-24T20:02:27Z</dc:date>
    </item>
  </channel>
</rss>

