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

Get Updates on the Splunk Community!

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...

Announcing the Migration of the Splunk Add-on for Microsoft Azure Inputs to ...

Announcing the Migration of the Splunk Add-on for Microsoft Azure Inputs to Officially Supported Splunk ...

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI! Discover how Splunk’s agentic AI ...