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!

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

Watch On Demand the Tech Talk on November 6 at 11AM PT, and empower your SOC to reach new heights! Duration: ...

Splunk Observability as Code: From Zero to Dashboard

For the details on what Self-Service Observability and Observability as Code is, we have some awesome content ...