<?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: How to create a transaction that   startswith=(something!=&amp;quot;(null)&amp;quot;) endswith=(something=&amp;quot;(null)&amp;quot;) in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-transaction-that-startswith-something-quot-null/m-p/328529#M97789</link>
    <description>&lt;P&gt;ohhk..i thought its null field but it's a string (null)&lt;BR /&gt;
Try below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | transaction deviceId startswith=(customerId!="(null)") endswith=eval(match(customerId, "(null)")) mvlist=true maxspan=10m | stats count by deviceId
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 26 Jan 2018 20:29:46 GMT</pubDate>
    <dc:creator>493669</dc:creator>
    <dc:date>2018-01-26T20:29:46Z</dc:date>
    <item>
      <title>How to create a transaction that   startswith=(something!="(null)") endswith=(something="(null)")</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-transaction-that-startswith-something-quot-null/m-p/328525#M97785</link>
      <description>&lt;P&gt;My goal is to create a transaction that ends with customerId being &lt;CODE&gt;"(null)"&lt;/CODE&gt; and starts with customerId being something &lt;CODE&gt;other than "(null)"&lt;/CODE&gt;. Here is my query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | transaction deviceId startswith=(customerId!="(null)") endswith=(customerId="(null)") maxspan=10m | stats count by deviceId
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;When I inspect the resulting list of deviceIds, none of them meet the criteria that I wanted for my transaction--none of them go from &lt;CODE&gt;customerId!="(null)"&lt;/CODE&gt; to &lt;CODE&gt;customerId="(null)"&lt;/CODE&gt;. I have tried reversing the log &lt;CODE&gt;... | reverse | transaction ...&lt;/CODE&gt;, but I get the same result.&lt;/P&gt;

&lt;P&gt;The only explanation I have come up with is that this has something to do with comparison to "(null)"--that in the end customerId will always be "(null)" after the last event--but this query compares customerId to the string "(null)" so that doesn't make sense.&lt;/P&gt;

&lt;P&gt;Any help would be greatly appreciated. Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jan 2018 18:47:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-transaction-that-startswith-something-quot-null/m-p/328525#M97785</guid>
      <dc:creator>ib_321</dc:creator>
      <dc:date>2018-01-26T18:47:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a transaction that   startswith=(something!="(null)") endswith=(something="(null)")</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-transaction-that-startswith-something-quot-null/m-p/328526#M97786</link>
      <description>&lt;P&gt;Hi @ib_321,&lt;BR /&gt;
before transaction command add &lt;CODE&gt;| fillnull&lt;/CODE&gt; which will fill all null values by zero&lt;BR /&gt;
try below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...| fillnull| transaction deviceId startswith=(customerId!="0") endswith=(customerId="0") maxspan=10m | stats count by deviceId
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 26 Jan 2018 19:08:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-transaction-that-startswith-something-quot-null/m-p/328526#M97786</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-01-26T19:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a transaction that   startswith=(something!="(null)") endswith=(something="(null)")</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-transaction-that-startswith-something-quot-null/m-p/328527#M97787</link>
      <description>&lt;P&gt;Thank you for your response. This didn't resolve the issue.&lt;/P&gt;

&lt;P&gt;I don't think &lt;CODE&gt;fillnull&lt;/CODE&gt;, replaces "(null)". For example,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | fillnull | search customerId="(null)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;returns a bunch of events.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jan 2018 20:16:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-transaction-that-startswith-something-quot-null/m-p/328527#M97787</guid>
      <dc:creator>ib_321</dc:creator>
      <dc:date>2018-01-26T20:16:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a transaction that   startswith=(something!="(null)") endswith=(something="(null)")</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-transaction-that-startswith-something-quot-null/m-p/328528#M97788</link>
      <description>&lt;P&gt;Interesting, the documentation at &lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/6.6.3/SearchReference/Fillnull"&gt;fillnull&lt;/A&gt; &lt;/P&gt;

&lt;P&gt;says - &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | fillnull
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;-- For the current search results, fill all empty fields with zero. &lt;/P&gt;</description>
      <pubDate>Fri, 26 Jan 2018 20:26:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-transaction-that-startswith-something-quot-null/m-p/328528#M97788</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2018-01-26T20:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a transaction that   startswith=(something!="(null)") endswith=(something="(null)")</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-transaction-that-startswith-something-quot-null/m-p/328529#M97789</link>
      <description>&lt;P&gt;ohhk..i thought its null field but it's a string (null)&lt;BR /&gt;
Try below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | transaction deviceId startswith=(customerId!="(null)") endswith=eval(match(customerId, "(null)")) mvlist=true maxspan=10m | stats count by deviceId
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 26 Jan 2018 20:29:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-transaction-that-startswith-something-quot-null/m-p/328529#M97789</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-01-26T20:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a transaction that   startswith=(something!="(null)") endswith=(something="(null)")</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-transaction-that-startswith-something-quot-null/m-p/328530#M97790</link>
      <description>&lt;P&gt;That seems to have solved my problem. Thank you!&lt;/P&gt;

&lt;P&gt;Can you explain why this query worked while mine didn't?&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jan 2018 23:22:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-transaction-that-startswith-something-quot-null/m-p/328530#M97790</guid>
      <dc:creator>ib_321</dc:creator>
      <dc:date>2018-01-26T23:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a transaction that   startswith=(something!="(null)") endswith=(something="(null)")</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-transaction-that-startswith-something-quot-null/m-p/328531#M97791</link>
      <description>&lt;P&gt;I think your query will also work just add &lt;CODE&gt;mvlist=true&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | transaction deviceId startswith=(customerId!="(null)") endswith=(customerId="(null)") mvlist=true maxspan=10m | stats count by deviceId
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The mvlist attribute controls whether the multivalue fields of the transaction are (1) a list of the original events ordered in arrival order or (2) a set of unique field values ordered lexigraphically. If a comma- or space-delimited list of fields is provided, only those fields are rendered as lists.&lt;/P&gt;</description>
      <pubDate>Sat, 27 Jan 2018 04:21:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-transaction-that-startswith-something-quot-null/m-p/328531#M97791</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-01-27T04:21:47Z</dc:date>
    </item>
  </channel>
</rss>

