Dashboards & Visualizations

Selecting all non null fields from

nisha_kapoor
Path Finder

I am trying to display only those fields which contain a non null value. What is wrong with this command to achieve my purpose?

index="test" | fields -isnull(*)

It simply displays my data as a raw csv record, whereas what I want it to get all those fieldnames which are not "".

Tags (1)
0 Karma

DalJeanis
Legend

fields doesn't display anything, it just eliminates whatever isn't named.

This sequence will kill all variables that have only null values in all records...

| rename _time as temptime
| streamstats count as recno
| untable recno field value
| xyseries recno field value
| rename temptime as _time

You will have to use the rename before-and-after sequence on any internal fields starting with _ that you want to retain.

0 Karma

woodcock
Esteemed Legend

Do this:

index="test" | stats values(*) AS * BY _serial

I am pretty sure that you will be unhappy with the results because I am quite certain that what you asked is not what you are really trying to do.

nisha_kapoor
Path Finder

Thank you for your reply, what I want is a list of fields having at least one non-null value. In other words, I want to eliminate the fields having null values for all records.

0 Karma

niketn
Legend

" I want to eliminate the fields having null values for all records."

-- If you put a field in table and all the field values are null then the field will anyways be removed from being displayed. Please add some sample data with example of what is being displayed vs what is it that you want.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Calling All Security Pros: Ready to Race Through Boston?

Hey Splunkers, .conf25 is heading to Boston and we’re kicking things off with something bold, competitive, and ...

Beyond Detection: How Splunk and Cisco Integrated Security Platforms Transform ...

Financial services organizations face an impossible equation: maintain 99.9% uptime for mission-critical ...

Customer success is front and center at .conf25

Hi Splunkers, If you are not able to be at .conf25 in person, you can still learn about all the latest news ...