Splunk Search

If two CSV files both have FieldA, how do I map FieldB from one of the CSV files to FieldA in the search results?

karthikTIL
Path Finder

HI,

I have a two CSV files like below

report.csv:

subject,cat
abcd,A-2
efgh,A-4
ijkl,A-4

eng.csv:

cat,Name
A-2,victor
A-4,alpha

My search is: source=report.csv | stats count by cat

The result is:
cat Count
A-2 1
A-4 2

My question is, how do I map the "cat" to "name" as per eng.csv and display count like
cat count
A-2 Victor 1
A-4 alpha 2

Please let me know how to do this

Tags (2)
0 Karma

stephanefotso
Motivator

First index report.csv
Second, with eng.csv follow this steps to create your lookup definition : http://docs.splunk.com/Documentation/Splunk/6.2.2/SearchTutorial/Usefieldlookups
Third just type

source=report.csv|stats count by cat, Name

If you still have problems creating the lookup, let me know.

SGF
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

.conf25 Global Broadcast: Don’t Miss a Moment

Hello Splunkers, .conf25 is only a click away.  Not able to make it to .conf25 in person? No worries, you can ...

Observe and Secure All Apps with Splunk

 Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

What's New in Splunk Observability - August 2025

What's New We are excited to announce the latest enhancements to Splunk Observability Cloud as well as what is ...