Splunk Search

Join Query

chuck_life09
Path Finder

I have an Index B  which has job_name and job_status details and another index A which has ticket number and job_name...

Index A to be joined with Index B to get the below details

ticket_number,job_name and job_status

I tried join type= inner job_name based on job_name
but i get empty results for job_status

what might be going wrong?

Labels (1)
Tags (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Please share the full query.

---
If this reply helps you, Karma would be appreciated.
0 Karma

chuck_life09
Path Finder

Hi @richgalloway 

 

The sample query with index details as below.

 

Index A 

ticket number , job name

Index B

Job Name,Status

Query :-

index=A 
| table ticket_number,job_name
| join type=left job_name
[search index=B 
| table Job_Name, Status
|rename Job_Name as "job_name"
]

0 Karma

richgalloway
SplunkTrust
SplunkTrust

That query looks like it should work fine.  Just make sure the field names are exactly as they appear in the indexes.

If you still have trouble getting it to work, try this alternative query.

(index=A ticket_number=* job_name=*) OR (index=B Job_Name=*)
| rename Job_Name as job_name
| stats values(*) as * by job_name
---
If this reply helps you, Karma would be appreciated.
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!

Build the Future of Agentic AI: Join the Splunk Agentic Ops Hackathon

AI is changing how teams investigate incidents, detect threats, automate workflows, and build intelligent ...

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...