Splunk Search

How can I refer part of query as a table?

jonvijay1993
Explorer

I have a dbx query plus SPL commands that makes me a certain table, which I want to refer to via a table name, is it possible?

 

The present table needs some new columns and that's what the above query adds, but the schema for my final table for my bar chart is a little different from the source table and hence I can't build on top of the above query using |, or I don't know how. Hence I was wondering if I can just use this via a table name.

Labels (6)
0 Karma

jonvijay1993
Explorer

My use case is I want to change this

select * from (an entire query replacing a table name)

to

select * from a_table

normally I would add the query in the table name as an emergency solution but the query has dbxquery and join etc that makes splunk go crazy.

 

I shall look into named searches, thank you! Will get back to you!

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

There is a mixture of naming here - You can saved a search as a named search which you can execute in another search. Does this satisfy your usecase?

0 Karma
Get Updates on the Splunk Community!

Detecting Remote Code Executions With the Splunk Threat Research Team

WATCH NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If exploited, ...

Enter the Splunk Community Dashboard Challenge for Your Chance to Win!

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

.conf24 | Session Scheduler is Live!!

.conf24 is happening June 11 - 14 in Las Vegas, and we are thrilled to announce that the conference catalog ...