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
Revered Legend

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!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...