Splunk Search

Create key value pair from a key and value column

Cuyose
Builder

I am not sure why I can't figure this out, been all over and each untable or makemv solution fails for this simple challenge.

I have a lookup with 3 fields
id, key, value

this will produce rows that look like the following with these headers
ID, KEY, VALUE
1, installDate, 10/15/2010
1,closeDate, 07/21,2003
1,deployed,yes
2,date1, .... etc.

I want to be able to do select ids where deployed=yes InstallDate=*

I can't for the life of me figure this out

0 Karma

somesoni2
SplunkTrust
SplunkTrust

Give this a try

| inputlookup yourlookup.csv | fields ID KEY VALUE
| eval {KEY}=VALUE | field - KEY VALUE
| stats values(*) as * by ID
| where deployed="yes" AND installDate="<whatever>"
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 ...