Splunk Search

How to join lookups?

bosseres
Contributor

Hello everyone!

I have 2 lookups - 1.csv and 2.csv

1.csv contains such table

host user result
host1 Alex success
host2 Michael fail

 

2.csv

host action
host1 action1
host2 action2

 

I want to make search that will join this two tables in one by field host (but only in search, without changing csv content).

It should turn out like this

host user result action
host1 Alex success action1
host2 Michael fail action

 

so if there is similar host in two tables - join them in one

thank you for your help

Labels (2)
Tags (2)
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @bosseres,

please try something like this:

| inputlookup 1.csv
| lookup 2.csv host 
| table host user result action

the lookup command is something near to a left join.

Ciao.

Giuseppe

Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Break the Build: Inside the KubeDoom Lounge at .conf26

    You step up to the machine. The pixelated corridors of a certain 1993 FPS load in front of you, EMP Pulse ...

Best Practices: Splunk auto adjust pipeline queue

When you enable autoAdjustQueue in Splunk, maxSize should be understood as the queue size Splunk starts with ...

Introducing the 2026 - 2027 SplunkTrust cohort!

The goal of the SplunkTrust™ membership has historically been to acknowledge and recognize those who go above ...