Splunk Search

How to select distinct rows from a lookup table?

kdoma
Explorer

How to select only distinct rows from the lookup table? I am selecting student details but I have duplicates in the lookup, so how to select only distinct rows from lookup?

0 Karma
1 Solution

somesoni2
Revered Legend

You can use dedup command to remove deplicates. Just identify the fields which can be used to uniquely identify a student (as studentID OR firstname-lastname combination OR something, and use those fields in dedup.

| inputlookup yourlookuptableName.csv | dedup primarykeyfield/primarykeyfieldsSeparatedByComma

View solution in original post

0 Karma

somesoni2
Revered Legend

You can use dedup command to remove deplicates. Just identify the fields which can be used to uniquely identify a student (as studentID OR firstname-lastname combination OR something, and use those fields in dedup.

| inputlookup yourlookuptableName.csv | dedup primarykeyfield/primarykeyfieldsSeparatedByComma
0 Karma

kdoma
Explorer

I got it Dedup function has worked

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

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