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!

New in Observability - Improvements to Custom Metrics SLOs, Log Observer Connect & ...

The latest enhancements to the Splunk observability portfolio deliver improved SLO management accuracy, better ...

Improve Data Pipelines Using Splunk Data Management

  Register Now   This Tech Talk will explore the pipeline management offerings Edge Processor and Ingest ...

3-2-1 Go! How Fast Can You Debug Microservices with Observability Cloud?

Register Join this Tech Talk to learn how unique features like Service Centric Views, Tag Spotlight, and ...