<?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 Transactions using different identifying fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Transactions-using-different-identifying-fields/m-p/141628#M39256</link>
    <description>&lt;P&gt;Attached is some data that you should be able to use to reproduce what I am trying to achieve.&lt;/P&gt;

&lt;P&gt;Events.csv – extract of raw_field and sourcetype&lt;BR /&gt;
Field extractions.txt – extract of field extractions from props.conf&lt;/P&gt;

&lt;P&gt;I'm trying to to follow the flow of transactions using Splunk.&lt;/P&gt;

&lt;P&gt;Transactions use different identifiers as they progress through which are: ORDER_NUMBER, CAR_PDR, CAR_PCR, PFM_PDR, PFM_PCR&lt;/P&gt;

&lt;P&gt;I an using joins to make sense of the results:&lt;/P&gt;

&lt;P&gt;chain=* | join PFM_PCR type=outer [search PFM_PCR=* PFM_PDR=&lt;EM&gt;] | join CAR_PCR type=outer [search CAR_PCR=&lt;/EM&gt; CAR_PDR=&lt;EM&gt;] | join PFM_PDR type=outer [search ORDER_NUMBER=&lt;/EM&gt; PFM_PDR=&lt;EM&gt;] | join CAR_PDR type=outer [search ORDER_NUMBER=&lt;/EM&gt; CAR_PDR=*]| transaction ORDER_NUMBER&lt;/P&gt;

&lt;P&gt;I thought I didn’t need the joins and could do the following instead:&lt;/P&gt;

&lt;P&gt;chain=* | transaction ORDER_NUMBER  CAR_PDR CAR_PCR PFM_PDR PFM_PCR&lt;/P&gt;

&lt;P&gt;but this had the effect of creating transactions that had all the keys as the tuple for the transaction ID. So we got a transactions for (order1,car_pdr1,…), (order1,car_pdr2,…) etc&lt;/P&gt;

&lt;P&gt;is there a better way of doing the transaction on ORDER_NUMBER  that avoids all those messy joins?&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 18:56:08 GMT</pubDate>
    <dc:creator>himynamesdave</dc:creator>
    <dc:date>2020-09-28T18:56:08Z</dc:date>
    <item>
      <title>Transactions using different identifying fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transactions-using-different-identifying-fields/m-p/141628#M39256</link>
      <description>&lt;P&gt;Attached is some data that you should be able to use to reproduce what I am trying to achieve.&lt;/P&gt;

&lt;P&gt;Events.csv – extract of raw_field and sourcetype&lt;BR /&gt;
Field extractions.txt – extract of field extractions from props.conf&lt;/P&gt;

&lt;P&gt;I'm trying to to follow the flow of transactions using Splunk.&lt;/P&gt;

&lt;P&gt;Transactions use different identifiers as they progress through which are: ORDER_NUMBER, CAR_PDR, CAR_PCR, PFM_PDR, PFM_PCR&lt;/P&gt;

&lt;P&gt;I an using joins to make sense of the results:&lt;/P&gt;

&lt;P&gt;chain=* | join PFM_PCR type=outer [search PFM_PCR=* PFM_PDR=&lt;EM&gt;] | join CAR_PCR type=outer [search CAR_PCR=&lt;/EM&gt; CAR_PDR=&lt;EM&gt;] | join PFM_PDR type=outer [search ORDER_NUMBER=&lt;/EM&gt; PFM_PDR=&lt;EM&gt;] | join CAR_PDR type=outer [search ORDER_NUMBER=&lt;/EM&gt; CAR_PDR=*]| transaction ORDER_NUMBER&lt;/P&gt;

&lt;P&gt;I thought I didn’t need the joins and could do the following instead:&lt;/P&gt;

&lt;P&gt;chain=* | transaction ORDER_NUMBER  CAR_PDR CAR_PCR PFM_PDR PFM_PCR&lt;/P&gt;

&lt;P&gt;but this had the effect of creating transactions that had all the keys as the tuple for the transaction ID. So we got a transactions for (order1,car_pdr1,…), (order1,car_pdr2,…) etc&lt;/P&gt;

&lt;P&gt;is there a better way of doing the transaction on ORDER_NUMBER  that avoids all those messy joins?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 18:56:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transactions-using-different-identifying-fields/m-p/141628#M39256</guid>
      <dc:creator>himynamesdave</dc:creator>
      <dc:date>2020-09-28T18:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: Transactions using different identifying fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transactions-using-different-identifying-fields/m-p/141629#M39257</link>
      <description>&lt;P&gt;So transaction should be working exactly as you're expecting here.  Consider:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;event=1 field1=foo
event=2 field1=foo
event=3 field1=foo field2=bar
event=4 field2=bar
event=5 field2=bar
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you run &lt;CODE&gt;|transaction field1 field2&lt;/CODE&gt; you'll actually get a single event based containing 1 through 5.  This is because it's looking for transitive relationships, and as long as there is at least one event where fields overlap, it'll consider them joined.  &lt;/P&gt;

&lt;P&gt;However, that ONLY works if you have some overlap connecting events.  &lt;/P&gt;

&lt;P&gt;Your sample data doesn't seem to include everything needed to test this.  For example, there are no events that meet the &lt;CODE&gt;EXTRACT-chain,PFM_PDR,File_name&lt;/CODE&gt;, &lt;CODE&gt;EXTRACT-chain (PcR finished)&lt;/CODE&gt;, &lt;CODE&gt;EXTRACT-PFM_PcR,PFM_PcR_type&lt;/CODE&gt;, &lt;CODE&gt;EXTRACT-PFM_PDR,PFM_PcR,chain,Product_name&lt;/CODE&gt; extractions from the PSM_FILE sourcetype.  &lt;/P&gt;</description>
      <pubDate>Wed, 11 Feb 2015 17:35:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transactions-using-different-identifying-fields/m-p/141629#M39257</guid>
      <dc:creator>emiller42</dc:creator>
      <dc:date>2015-02-11T17:35:14Z</dc:date>
    </item>
    <item>
      <title>Re: Transactions using different identifying fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transactions-using-different-identifying-fields/m-p/141630#M39258</link>
      <description>&lt;P&gt;Hi david&lt;/P&gt;

&lt;P&gt;While not exactly what you are asking for, you might be able to get around the problem by using the stats command and list() by ORDER_NUMBER&lt;/P&gt;

&lt;P&gt;| stats count as eventcount list(_raw) as events,list(PFM_PCR) as PFM_PCR,list(CAR_PCR) as CAR_PCR,list(PFM_PDR) as PFM_PDR,list(CAR_PDR) as CAR_PDR, range(_time) as duration by ORDER_NUMBER&lt;/P&gt;

&lt;P&gt;After this command you can apply some conditional searching to narrow down the results to fit your outer join "criterias"&lt;/P&gt;

&lt;P&gt;j&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 18:54:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transactions-using-different-identifying-fields/m-p/141630#M39258</guid>
      <dc:creator>jbjerke_splunk</dc:creator>
      <dc:date>2020-09-28T18:54:05Z</dc:date>
    </item>
  </channel>
</rss>

