Splunk Search

InputLookup - find unique values across 4 fields

brdr
Contributor

I have a lookup file that contain 4 fields (field1, field2, field3, field4) which contains an account number. Same account number can exist across the different fields as well as unique account numbers in these fields. I need a search that provides a count of unique account numbers across the 4 fields (and as a separate list of events).

0 Karma

somesoni2
Revered Legend

Try this

| inputlookup yourlookup.csv | table field1 field2 field2 field4 | eval temp=1
| untable temp field AccountNumber
| stats dc(AccountNumber) as UniqueAccountNumbers
0 Karma

brdr
Contributor

Nice. Will try it out. Thanks.

0 Karma
Get Updates on the Splunk Community!

Exciting News: The AppDynamics Community Joins Splunk!

Hello Splunkers,   I’d like to introduce myself—I’m Ryan, the former AppDynamics Community Manager, and I’m ...

The All New Performance Insights for Splunk

Splunk gives you amazing tools to analyze system data and make business-critical decisions, react to issues, ...

Good Sourcetype Naming

When it comes to getting data in, one of the earliest decisions made is what to use as a sourcetype. Often, ...