Splunk Search

order changing with the table command ??

rakesh_498115
Motivator

Hi.

When i am using the table command ? i am not getting the fields in the order i have ginen ??
how can i do it be in the same order which i have mentioned ??

my query is :

soucetype="mydata" | table _raw,Recieved,Sent

i want this order of display . but i am gettin in Received,Sent,_raw in this order ..pls help..i want the same order mentiond with the table commmand ..

Tags (1)
0 Karma
1 Solution

MuS
SplunkTrust
SplunkTrust

Hi

it took me some reading the docs and trying out of some commands and I got what you are looking for 😉

the easiest way is to rename _raw to anything and use the new field name in the table:

 soucetype="mydata" | rename _raw as newraw | table newraw, Recieved, Sent

there are probably more effective ways of doing this, but it worked for example you provided and it answers your question.

cheers,

MuS

View solution in original post

arihant16cse
Path Finder

| table Receive,sent,_raw

0 Karma

rajeev_ku
Path Finder

Best way to do it as below
soucetype="mydata" | rename _raw as newraw | table Recieved, Sent, newraw
it will adjust raw data at most right position.

0 Karma

MuS
SplunkTrust
SplunkTrust

Hi

it took me some reading the docs and trying out of some commands and I got what you are looking for 😉

the easiest way is to rename _raw to anything and use the new field name in the table:

 soucetype="mydata" | rename _raw as newraw | table newraw, Recieved, Sent

there are probably more effective ways of doing this, but it worked for example you provided and it answers your question.

cheers,

MuS

rakesh_498115
Motivator

Thans Mus .. i got it now ..:)

0 Karma

MuS
SplunkTrust
SplunkTrust

rakesh, sorry but I hope you are aware that you can scroll a windows not only up and down but also to the left or to the right? _raw is usually very long, therefore received and sent are WAY ON THE RIGHT of your screen.

0 Karma

rakesh_498115
Motivator

Hi MuS,

when i am used like this..i am getting the newraw values alone...Received , Sent are not at all displayin ..pls help..

0 Karma

Ayn
Legend

Use fields.

fields _raw,Received,Sent
0 Karma

rakesh_498115
Motivator

fields command is not working like this .... 😞

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Build resilience for the agentic era: Join us at Splunk Go San Jose

AI is changing how organizations build, operate, and secure digital services. As teams adopt AI agents and ...

Manage Edge Processor pipelines end to end with APIs

This guide uses the Data Management APIs to create an Edge Processor, onboard one instance, deploy a pipeline ...

Splunk Brings Proof of Control to Digital Asset Transfers

Digital assets now sit inside the core of financial services. HSBC launched its Tokenized Deposit Service in ...