<?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 Use transaction command to process data and get 3 different results?  Is this even possible?? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Use-transaction-command-to-process-data-and-get-3-different/m-p/443710#M171397</link>
    <description>&lt;P&gt;Here is what I have:   ...a log table with a unique &lt;STRONG&gt;FName-LName &amp;amp; Job-Title&lt;/STRONG&gt;.&lt;BR /&gt;
I pulled 100 rows on both yesterday and 100 today so there are 2 different dates for each set of 100 rows.&lt;/P&gt;

&lt;P&gt;• I want to generate a report that will list any people that are in the current-days pull that are not found in yesterday's pull. (New people) &lt;BR /&gt;
• I also want to list any people that are in yesterday's pull but are not found in the current-day's pull. (People that left) &lt;BR /&gt;
• I also want to pull any people in the current day's pull that have a different Job-Title from yesterday's pull. (Promoted or demoted   people).&lt;/P&gt;

&lt;P&gt;Can this be done in 1 SPL setup?    Or must it be 3 separate pulls?   &lt;/P&gt;</description>
    <pubDate>Wed, 08 May 2019 21:18:58 GMT</pubDate>
    <dc:creator>timothytruax</dc:creator>
    <dc:date>2019-05-08T21:18:58Z</dc:date>
    <item>
      <title>Use transaction command to process data and get 3 different results?  Is this even possible??</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-transaction-command-to-process-data-and-get-3-different/m-p/443710#M171397</link>
      <description>&lt;P&gt;Here is what I have:   ...a log table with a unique &lt;STRONG&gt;FName-LName &amp;amp; Job-Title&lt;/STRONG&gt;.&lt;BR /&gt;
I pulled 100 rows on both yesterday and 100 today so there are 2 different dates for each set of 100 rows.&lt;/P&gt;

&lt;P&gt;• I want to generate a report that will list any people that are in the current-days pull that are not found in yesterday's pull. (New people) &lt;BR /&gt;
• I also want to list any people that are in yesterday's pull but are not found in the current-day's pull. (People that left) &lt;BR /&gt;
• I also want to pull any people in the current day's pull that have a different Job-Title from yesterday's pull. (Promoted or demoted   people).&lt;/P&gt;

&lt;P&gt;Can this be done in 1 SPL setup?    Or must it be 3 separate pulls?   &lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2019 21:18:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-transaction-command-to-process-data-and-get-3-different/m-p/443710#M171397</guid>
      <dc:creator>timothytruax</dc:creator>
      <dc:date>2019-05-08T21:18:58Z</dc:date>
    </item>
    <item>
      <title>Re: Use transaction command to process data and get 3 different results?  Is this even possible??</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-transaction-command-to-process-data-and-get-3-different/m-p/443711#M171398</link>
      <description>&lt;P&gt;if you please provide sample data, we could write it. Hopefully this can be done in 1 SPL&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2019 21:51:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-transaction-command-to-process-data-and-get-3-different/m-p/443711#M171398</guid>
      <dc:creator>koshyk</dc:creator>
      <dc:date>2019-05-08T21:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: Use transaction command to process data and get 3 different results?  Is this even possible??</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-transaction-command-to-process-data-and-get-3-different/m-p/443712#M171399</link>
      <description>&lt;P&gt;Hello Koshyk -&lt;BR /&gt;
Thank you for answering.   &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
See sample csv type data I put together quickly below; you can copy the small table and paste into Notetab as a .txt type and then ingest.  Its not big but can be used to prove that your SPL works.&lt;/P&gt;

&lt;P&gt;---------- Begin table &lt;/P&gt;

&lt;P&gt;tim ham,driver,05-08-2019&lt;BR /&gt;
tom hem,driver,05-08-2019&lt;BR /&gt;
tod harm,driver,05-08-2019&lt;BR /&gt;
jim slump,driver,05-08-2019&lt;BR /&gt;
john hill,driver,05-08-2019&lt;BR /&gt;
fill billy,driver,05-08-2019&lt;BR /&gt;
slim pickins,driver,05-08-2019&lt;BR /&gt;
jill hill,driver,05-08-2019&lt;BR /&gt;
betty mids,driver,05-08-2019&lt;BR /&gt;
rich farm,driver,05-08-2019&lt;BR /&gt;
tim ham,driver,05-09-2019&lt;BR /&gt;
tom hem,fast-driver,05-09-2019&lt;BR /&gt;
tod harm,driver,05-09-2019&lt;BR /&gt;
jim slump,driver,05-09-2019&lt;BR /&gt;
rick hull,driver,05-09-2019&lt;BR /&gt;
fill billy,slow-driver,05-09-2019&lt;BR /&gt;
slim pickins,driver,05-09-2019&lt;BR /&gt;
jill hill,driver,05-09-2019&lt;BR /&gt;
betty mids,driver,05-09-2019&lt;BR /&gt;
rich farm,driver,05-09-2019&lt;BR /&gt;
lacey underalls,farm-driver,05-09-2019&lt;/P&gt;

&lt;P&gt;---------- End table&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2019 23:57:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-transaction-command-to-process-data-and-get-3-different/m-p/443712#M171399</guid>
      <dc:creator>timothytruax</dc:creator>
      <dc:date>2019-05-08T23:57:08Z</dc:date>
    </item>
    <item>
      <title>Re: Use transaction command to process data and get 3 different results?  Is this even possible??</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-transaction-command-to-process-data-and-get-3-different/m-p/443713#M171400</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=YouShouldAlwaysSpecifyAnIndex AND sourcetype=AndSourcetypeToo ((earliest=-1d@d latest=@d-1) OR (earliest=@d))
| bin _time span=1d
| stats dc(_time) AS timeCount list(_time) AS times dc(Job-Title) AS JobCount list(Job-Title) AS JobTitles BY "FName-LName"
| multireport
[ where timeCount==1 AND times &amp;gt;= relative_time(now(), "@d")
| eval type = "hired"]
[ where timeCount==1 AND times &amp;lt; relative_time(now(), "@d")
| eval type = "fired"]
[ where JobCount&amp;gt;1
| eval type = "changed"]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;P.S.  Field names with hyphens are evil and &lt;CODE&gt;transaction&lt;/CODE&gt; is to be avoided at all costs.&lt;/P&gt;</description>
      <pubDate>Thu, 09 May 2019 01:35:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-transaction-command-to-process-data-and-get-3-different/m-p/443713#M171400</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-05-09T01:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: Use transaction command to process data and get 3 different results?  Is this even possible??</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-transaction-command-to-process-data-and-get-3-different/m-p/443714#M171401</link>
      <description>&lt;P&gt;Thank you Woodcock for your quick answer!&lt;BR /&gt;&lt;BR /&gt;
I am going to try this and see if it works.&lt;BR /&gt;&lt;BR /&gt;
I will thumbs up you when done.   &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 May 2019 21:09:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-transaction-command-to-process-data-and-get-3-different/m-p/443714#M171401</guid>
      <dc:creator>timothytruax</dc:creator>
      <dc:date>2019-05-09T21:09:01Z</dc:date>
    </item>
    <item>
      <title>Re: Use transaction command to process data and get 3 different results?  Is this even possible??</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-transaction-command-to-process-data-and-get-3-different/m-p/443715#M171402</link>
      <description>&lt;P&gt;Woocock!&lt;BR /&gt;&lt;BR /&gt;
You're a Splunk Ninja and a genius too!&lt;BR /&gt;&lt;BR /&gt;
Thank you so much.&lt;BR /&gt;&lt;BR /&gt;
Solved my issue and your SPL contruct has taught me a good deal.   &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Below is the actual data I used - ingesting on 2 different days!&lt;BR /&gt;
••••••••••••••••••••••••••••••••••••••••••••&lt;BR /&gt;
Day 1 ---&lt;BR /&gt;
FnameLname,JobTitle,IngestDate&lt;BR /&gt;
tim ham,driver,05-08-2019&lt;BR /&gt;
tom hem,driver,05-08-2019&lt;BR /&gt;
tod harm,driver,05-08-2019&lt;BR /&gt;
jim slump,driver,05-08-2019&lt;BR /&gt;
john hill,driver,05-08-2019&lt;BR /&gt;
fill billy,driver,05-08-2019&lt;BR /&gt;
slim pickins,driver,05-08-2019&lt;BR /&gt;
jill hill,driver,05-08-2019&lt;BR /&gt;
betty mids,driver,05-08-2019&lt;BR /&gt;
rich farm,driver,05-08-2019&lt;BR /&gt;
••••••••••••••••••••••••••••••••••••••••••••&lt;BR /&gt;
Day 2&lt;BR /&gt;
FnameLname,JobTitle,IngestDate&lt;BR /&gt;
tim ham,driver,05-09-2019&lt;BR /&gt;
tom hem,fast-driver,05-09-2019&lt;BR /&gt;
tod harm,driver,05-09-2019&lt;BR /&gt;
jim slump,driver,05-09-2019&lt;BR /&gt;
rick hull,driver,05-09-2019&lt;BR /&gt;
fill billy,slow-driver,05-09-2019&lt;BR /&gt;
slim pickins,driver,05-09-2019&lt;BR /&gt;
jill hill,driver,05-09-2019&lt;BR /&gt;
betty mids,driver,05-09-2019&lt;BR /&gt;
rich farm,driver,05-09-2019&lt;BR /&gt;
lacey underalls,farm-driver,05-09-2019&lt;BR /&gt;
••••••••••••••••••••••••••••••••••••••••••••&lt;BR /&gt;
Your modified SPL (Works Great!)&lt;BR /&gt;
index="table4work_all" ((earliest=-1d@d latest=@d-1) OR (earliest=@d))&lt;BR /&gt;
| bin _time span=1d&lt;BR /&gt;
| stats dc(_time) AS timeCount values(_time) AS times dc(JobTitle) AS JobCount values(JobTitle) AS JobTitles BY FnameLname&lt;BR /&gt;
| multireport&lt;BR /&gt;
[ where timeCount==1 AND times &amp;gt;= relative_time(now(), "@d")&lt;BR /&gt;
| eval type = "hired"]&lt;BR /&gt;
[ where timeCount==1 AND times &amp;lt; relative_time(now(), "@d")&lt;BR /&gt;
| eval type = "fired"]&lt;BR /&gt;
[ where JobCount&amp;gt;1&lt;BR /&gt;
| eval type = "changed"]&lt;/P&gt;

&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:29:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-transaction-command-to-process-data-and-get-3-different/m-p/443715#M171402</guid>
      <dc:creator>timothytruax</dc:creator>
      <dc:date>2020-09-30T00:29:06Z</dc:date>
    </item>
    <item>
      <title>Re: Use transaction command to process data and get 3 different results?  Is this even possible??</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-transaction-command-to-process-data-and-get-3-different/m-p/443716#M171403</link>
      <description>&lt;P&gt;OK, be sure to click &lt;CODE&gt;Accept&lt;/CODE&gt; to close the question.&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2019 17:22:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-transaction-command-to-process-data-and-get-3-different/m-p/443716#M171403</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-05-10T17:22:28Z</dc:date>
    </item>
  </channel>
</rss>

