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!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...