Splunk Search

Fill field with first value

cxs6345
Engager

I have a data set for web traffic.  A sessionID ties all traffic for an individual browsing session together - all events from the time you open a new tab until you close it.  There is also a memberID field.  Some records do NOT have a value populated for memberID, so I want to return each record for the sessionID with the FIRST non-null value found in the sessionID.  For instance

timesessionIDmemberIDevalField
12:011<NULL>abc
12:021<NULL>abc
12:031abcabc
12:041<NULL>abc


Can someone help me out with how to get this evalField column?  Thanks so much!

Labels (4)
0 Karma
1 Solution

PickleRick
SplunkTrust
SplunkTrust

That's job for eventstats.

<your search>
| eventstats first(memberID) as memberID by sessionID

 

View solution in original post

PickleRick
SplunkTrust
SplunkTrust

That's job for eventstats.

<your search>
| eventstats first(memberID) as memberID by sessionID

 

Get Updates on the Splunk Community!

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

Splunk Decoded: Business Transactions vs Business IQ

It’s the morning of Black Friday, and your e-commerce site is handling 10x normal traffic. Orders are flowing, ...

Fastest way to demo Observability

I’ve been having a lot of fun learning about Kubernetes and Observability. I set myself an interesting ...