Getting Data In

Using an outer join with an inputlookup file

jsmith39
Path Finder

I'm trying to match the dates on specific event logs with an inputlookup file. I've done this in the past and it has worked perfectly but for some reason, in this case the data is not coming back as expected and I'm hoping someone can shine a light on the issue.

My inputlookup csv file is just one column with a list of county names in it. My query is looking through event logs to find a specific event, then parse the date down to a specific format and return that result next to the county name. The interesting field is db_name which corresponds exactly to the county name field.

So my expected results are
County DB Backup
Albany Thursday, July, 10th, 2014
Broome Thursday, July, 10th, 2014
....

What is happening instead is I'm getting the above results but instead of db_name Albany being matched up to County Albany, the query has grabbed one database record and populated the entire list with it.

| inputlookup counties.csv | join type=outer [search host=main_server EventCode=17055 | sort -_time | dedup db_name | eval "DB Backups"=strftime(_time, "%A, %b %d, %Y")] | table County "DB Backups"

Tags (2)

somesoni2
Revered Legend

I see the join field name is not specified and that could be the reason for that behaviour.
Try this

| inputlookup counties.csv | join type=left County [search host=main_server EventCode=17055 | sort -_time | dedup db_name | eval "DB Backups"=strftime(_time, "%A, %b %d, %Y")] | table County "DB Backups"

Updated

Try this

host=main_server EventCode=17055 | sort -_time | dedup db_name | eval "DB Backups"=strftime(_time, "%A, %b %d, %Y") | table County "DB Backups" | append [ | inputlookup counties.csv ] | stats values("DB Backups") as "DB Backups" by County
0 Karma

somesoni2
Revered Legend

Try the updated answer (mimicing full outer join)

0 Karma

jsmith39
Path Finder

Thank you for replying, unfortunately that didn't work. It did keep Splunk from returning the same record repeatedly, but it ended up not returning any data other than the County list that is part of the .csv file.

I removed the | table ... to see what all was being returned but all of the fields except for county were empty,

0 Karma
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!

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...

Network to App: Observability Unlocked [May & June Series]

In today’s digital landscape, your environment is no longer confined to the data center. It spans complex ...

SPL2 Deep Dives, AppDynamics Integrations, SAML Made Simple and Much More on Splunk ...

Splunk Lantern is Splunk’s customer success center that provides practical guidance from Splunk experts on key ...