All Apps and Add-ons

How to extract data in lookup?

smanojkumar
Contributor

Hi There!

    I'm having the query, In the station_check_kvstore lookup , the field check_date consists of 180 values for a single src_name, we are having many src_name 

   For instance,  when src_name = 51363 , check_date consists of 180 values,

If we are using this query, it fetched only 100 values of check_date for a single src_name, we need all values or the latest date in check_date,

Solution for both ways is welcome,

 

| inputlookup check_kvstore
| search src_name = 51363
| lookup station_check_kvstore src_name Email OUTPUT check_date
| table src_name Email check_date

 

Thanks is Advance!!

Labels (1)
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @smanojkumar,

let me understand:

  • you have two lookups: check_kvstore and station_check_kvstore,
  • it's possible to correlate these two lookups using two keys: src_name Email ,
  • but the problem is thatthere are many (180) values for the check_date field, each one in a different row,

is it correct?

if this is your situation, you could try:

| inputlookup check_kvstore
| append [ | inputlookup station_check_kvstore ]
| search src_name = 51363
| stats values(check_date) AS check_date BY src_name Email

This is possible only if the station_check_kvstore lookup has less than 50,000 values.

if you want a table with a value for each row, you could use this:

| inputlookup check_kvstore
| append [ | inputlookup station_check_kvstore ]
| search src_name = 51363
| stats count BY src_name Email check_date
| fields - count

Ciao.

Giuseppe

0 Karma
Get Updates on the Splunk Community!

Observability Unlocked: Kubernetes Monitoring with Splunk Observability Cloud

 Ready to master Kubernetes and cloud monitoring like the pros? Join Splunk’s Growth Engineering team for an ...

Update Your SOAR Apps for Python 3.13: What Community Developers Need to Know

To Community SOAR App Developers - we're reaching out with an important update regarding Python 3.9's ...

October Community Champions: A Shoutout to Our Contributors!

As October comes to a close, we want to take a moment to celebrate the people who make the Splunk Community ...