Splunk Search

Combine two tables into one wrt two common parameter(where blank values should be filled with zero "0")

harshal_chakran
Builder

Hi ,
I have two input csv's which are displayed in splunk as shown in below image:

alt text

I want to search in second csv with respect to first CSV's param1 and param2.

i.e. To display a final table where, first csv output is as it is, only second csv's "second value" column is added with matching param1 and param2 value between both CSV. And for those , where there is no match should be filled with zero, "0".

I know its difficult to understand, hence putting the image for reference:

alt text

I tried the join command, but if those param1 and param2 fields from first CSV are not available in second CSV, that result is not displayed, which is not desirable.

Kindly help me to get the output as per the above image.

Tags (4)
0 Karma
1 Solution

martin_mueller
SplunkTrust
SplunkTrust

You could do this:

search for first CSV | join type=left param1 param2 [search for second CSV] | fillnull value2

View solution in original post

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

You could do this:

search for first CSV | join type=left param1 param2 [search for second CSV] | fillnull value2
0 Karma

harshal_chakran
Builder

Thanks martin_mueller

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...