Splunk Search

Lookup command - multiple input fields

HeinzWaescher
Motivator

Hi,

is it possible to use more than one input field within a lookup command?
The lookuptable looks like this:

User | Country | FieldA

I tried it like this, but it didn't work:

| lookup lookup.csv User, Country OUTPUT fieldA

BR

Heinz

Tags (2)
1 Solution

MuS
SplunkTrust
SplunkTrust

Hi HeinzWaescher,

see the docs about lookup

Note: The lookup command can accept multiple lookup and local fields and destfields. For example:

lookup <lookup-table-name> <lookup-field1> AS <local-field1>, <lookup-field2> AS <local-field2> OUTPUTNEW <lookup-destfield1> AS <local-destfield1>, <lookup-destfield2> AS <local-destfield2>

the only thing you must be aware of, is that the local-field should exists if you use it in a lookup. That would be in your use case User and Country.

hope this helps ...

cheers, MuS

View solution in original post

Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...