Splunk Search

Replacing join command to integrate data from two different sources with lookups

ej56ygur
New Member

Hello people,

I am new in Splunk. So far I have been using join commands to integrate data from two different sources in a common field. The problem with this is that the searches take too long. apparently through lookups this should work faster. Would anybody be so kind to explain me exactly how I should do this ? it would be a massive thankyou from me.

Cheers

Tags (2)
0 Karma

woodcock
Esteemed Legend

Show us the search. How can we help otherwise?

0 Karma

dmarling
Builder

Can you provide some examples of the different queries that you need to join? Instead of doing things with join or lookups, you could use stats command on the field you were using to join. Lookups are fast, but require maintenance and can take up large amounts of disk space on your search head if you have an extremely large data set you are working with. Here's an extremely high level concept of using stats to combine data from different sources:

(search string 1) OR (string string 2)
| eval joiner=if(criteria unique to search string 1, field from search string 1 that you join on, field from search string 2 that you join on)
| stats values("Field from Search string 1") as "Field from Search string 1" values("Field from Search string 2") as "Field from Search string 2" by joiner
If this comment/answer was helpful, please up vote it. Thank you.
0 Karma

ej56ygur
New Member

First of all thank you so much for your answer Dustin. Tomorrow I will have the access to the code and will post it. than you so much

0 Karma

jodyfsu
Path Finder

If you have a common field in 2 different sources you may be able to crate an Alias for the fields.
https://docs.splunk.com/Documentation/Splunk/7.2.6/Knowledge/Addaliasestofields

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