Splunk Search

See what values match in a specified field between lookups?

atebysandwich
Path Finder

I have two look up and both have a field called DNS. I need to figure out which values in those fields match. I have tried the below per a different thread, which in theory is what I'm looking for, but I kept getting an error (Error in 'from' command: Invalid dataset specifier) at the join command on line 3. 

Similar issue but solution didn't work 

 

| inputlookup Test1.csv
| fields UserName, Count | rename Count as Count1
| join type=inner UserName
[| inputlookup Test2.csv
| fields UserName, Count | rename Count as count2]

 

 

Labels (3)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

Check the search log to see if there's better information about that error.

This query might give you the results you want.

| inputlookup Test1.csv
| fields UserName, Count | rename Count as Count1
| append [ | inputlookup Test2.csv
  | fields UserName, Count | rename Count as count2 ]
| stats values(*) as * by UserName
---
If this reply helps you, Karma would be appreciated.

View solution in original post

yuanliu
SplunkTrust
SplunkTrust

Instead of expensive join, you can simply perform a lookup which is efficient.

| inputlookup Test1.csv
| fields UserName, Count | rename Count as Count1
| lookup Test2.csv UserName OUTPUT Count as count2
| where isnotnull(count2)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Check the search log to see if there's better information about that error.

This query might give you the results you want.

| inputlookup Test1.csv
| fields UserName, Count | rename Count as Count1
| append [ | inputlookup Test2.csv
  | fields UserName, Count | rename Count as count2 ]
| stats values(*) as * by UserName
---
If this reply helps you, Karma would be appreciated.
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...