Splunk Search

How to bring non matching values into the same column

ayush1906
Path Finder

Hi ,

My current index when done table shows:

Name| Attendance | Class
abc | Present | 2A
efg | Present | 2A

And my lookup has the following details: (I can edit the values in this lookup)
Name Attendance Class
abc

efg
hig

And my expected output is
Name| Attendance | Class
abc | Present | 2A
efg | Present | 2A
hig | absent

When I am trying to do append, it actually brings names twice. Any advice?
This is just a sample representation, I have other columns as well.

0 Karma
1 Solution

woodcock
Esteemed Legend

DO NOT USE join; try this:

Your first search here:
| inputlookup append=t YourLookupNameHere.csv
| stats first(Attendance) AS Attendance Values(Class) AS Class BY Name
| fillnull value="Absent" Attendance

View solution in original post

0 Karma

woodcock
Esteemed Legend

DO NOT USE join; try this:

Your first search here:
| inputlookup append=t YourLookupNameHere.csv
| stats first(Attendance) AS Attendance Values(Class) AS Class BY Name
| fillnull value="Absent" Attendance
0 Karma

ayush1906
Path Finder

thanks 🙂

0 Karma

to4kawa
Ultra Champion
your search
|table Name Attendance Class
|join Name type=outer [|inputlookup your_lookup]
|eval Attendance=if(Attendance!="",Attendance,"absent")

Hi, how about this?

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...