Splunk Search

Append results in a single line.

Raging_Rags
Engager

| dbxquery connection="*"  query="select STOREENT_ID,count(*) O_C from table1 "
| appendcols
[| dbxquery connection="*" query="select count(*) P_S_T from table2 "
| join
[| dbxquery connection="*" query="select count(*) P_E_Y from table2"]
|join [dbxquery connection="*" query="select count(*) P_ACTIVE from table2 where status=1"]]

 

This my sample query, I want all the results in a single line. The value before append prints in a line and after append the values are printed in a new line.

Labels (5)
0 Karma

to4kawa
Ultra Champion

| stats values(*) as *

 

try this.

Raging_Rags
Engager

Actually its working but 2 rows get mixed up.

 

0 Karma

to4kawa
Ultra Champion

for mixed up field

| eval fieldname=mvjoin(mixed_up_field,",")

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...