Splunk Search

How to join 2 different source tyoe using identity column?

muguniya
Explorer

Hi All,

We have 2 different sourcetype master and child need to join/append the source type on identity column master.id and child.mastertable_id. Please let us how can we display the result in search query using table format.

sourcetype=master :
id(pk)|filename|status
123|test1.txt|S
124|test2.txt|F
125|test3.txt|S
126|test4.txt|F

sourcetype=child :
id|mastertable_id(FK)|msg
221|124|connectivity issue
223|126|user aborted

Final result should look like:
id|filename|status|childid|msg
123|test1.txt|S|NA|NA
124|test2.txt|F|221|connectivity issue
125|test3.txt|S|NA|NA
126|test4.txt|F|223|126|user aborted

Thanks

Tags (3)
0 Karma

HiroshiSatoh
Champion

What with this?

(your search)|rename id as childid|rename mastertable_id(FK) as id|rename id(pk) as id|stats max(filename) as filename,max(status) as status,max(childid) as childid,max(msg) as msg by id

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!

Deep insights, no barriers: Splunk Observability Cloud Free Edition

As software delivery cycles continue to accelerate, observability shouldn’t be a luxury — it should be a ...

Monitoring AI Agents with Splunk Observability Cloud

Let’s say I’m running a travel planning AI app in production. A user asks for three concise hotel options in ...

[Puzzles] Solve, Learn, Repeat: Tiling

This puzzle (first published here) is based on finding groups of tessellated tiles (inspired by floor tiles I ...