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!

.conf24 | Day 0

Hello Splunk Community! My name is Chris, and I'm based in Canberra, Australia's capital, and I travelled for ...

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

(view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...