Splunk Search

How can we add a single column from 2nd table to 1st table using search query in Splunk

Narendra045
Explorer

Hi,

I have two tables and in first table it contains 13 columns and from second table only one column i need to add to table 1. I am getting the data from a database, can you please help me out.

the below query is using to get first table data,

| dbxquery query="SELECT BEX_DTE_BSNS, BEX_NUM_COMPL, BEX_NUM_COMPL_TYPE, BEX_TSP_END, BEX_CNT_EXEC, BEX_NUM_GROUP, BEX_NUM_JOB, BEX_NME_NET, BEX_NUM_RESTART, BEX_TSP_START, BEX_NME_BPR, BEX_NME_LOCATION, BEX_IND_SKIPPED FROM \"LoanIQDB\".\"LS2USER\".\"VLS_BATCH_EXEC\"" connection="loaniq_10_10_2_10"

the below query is to get that particular column from that 2nd table,

| dbxquery query="SELECT BNT_DSC_JOB FROM \"LoanIQDB\".\"LS2USER\".\"VLS_BATCH_NET\"" connection="loaniq_10_10_2_10"

Labels (1)
0 Karma

Narendra045
Explorer

yes the data will be in correct format only, if possible can you please provide the syntax.

0 Karma

PickleRick
SplunkTrust
SplunkTrust
0 Karma

PickleRick
SplunkTrust
SplunkTrust

Well, you can use appendcols but the question is whether the resulting set will make any sense.

If you have any means of corelating between those two queries, you should do so on the DB level and return complete results. Otherwise you'll just get two unrelated sets of fields glued together without any logical link between them.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...