Splunk Search

How to merge two fields values into a single field?

Allampally
Path Finder

Hi,

I have the below stats result

**Service          Method               Action**
Service1                  Method1                 NULL
Service2                  Method2                 NULL
Service3                  NULL                Method3
Service4                  NULL                Method4

Now I want to merge Method and Action Fields into a single field by removing NULL values in both fields.

1 Solution

xpac
SplunkTrust
SplunkTrust

Hey,

This looks like the perfect use case for coalesce():

| eval Method=coalesce(Method, Action)

Read up on its details here:
http://docs.splunk.com/Documentation/Splunk/7.1.0/SearchReference/ConditionalFunctions

View solution in original post

xpac
SplunkTrust
SplunkTrust

Hey,

This looks like the perfect use case for coalesce():

| eval Method=coalesce(Method, Action)

Read up on its details here:
http://docs.splunk.com/Documentation/Splunk/7.1.0/SearchReference/ConditionalFunctions

Get Updates on the Splunk Community!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...