juttle


Viewing unique fields


Is there a juttle program I can run to view all unique fields within a given query? I'm trying comb through a list of events of the same type that have a ton of different fields.
I know I could just use the #table sink and scroll right but, I'd like to view unique fields in a list if possible.
Hacky but works:
events -from :5 minutes ago: -to :now: | head 1 | #logger -display.style 'pretty'
You get:
{
"bytes" : 7745,
"status" : "200",
"user_agent" : "Mozilla/5.0 (iPhone; CPU iPhone OS 511 like Mac OS X) AppleWebKit/534.46 (KHTML like Gecko) Version/5.1 Mobile/9B206 Safari/7534.48.3",
"version" : "1.1",
"ctry" : "US",
"ident" : "-",
"message" : "194.97.17.121 - - [2014-02-25T09:00:00-08:00] \"GET /black\" 200 7745 \"http://google.co.in/\" \"Mozilla/5.0 (iPhone; CPU iPhone OS 511 like Mac OS X) AppleWebKit/534.46 (KHTML like Gecko) Version/5.1 Mobile/9B206 Safari/7534.48.3\"",
"auth" : "-",
"verb" : "GET",
"url" : "/black",
"source_host" : "www.jut.io",
"referer" : "http://google.co.in/",
"space" : "default",
"type" : "event",
"time" : "2014-12-11T23:46:21.905Z",
"mock_type" : "demo",
"event_type" : "web"
}
You can use the split proc in combination with reduce by to get this list.
emit -limit 1
|(
put field1 = 1, field2 = 2;
put field2 = 2, field3 = 3;
)| split // break each point into one point for each field, assigning each field name into the point's name field
| reduce by name // get unique list of name field values
| sort name
| #logger
{"name":"field3"}
{"name":"field2"}
{"name":"field1"}
==============================================================

Related Links

Creating Spaces in Jut
Viewing unique fields

Categories

HOME
orientdb
dotnetnuke
compilation
openlayers-3
odata
vsts-build
docker-cloud
amp
dji-sdk
openfoam
static-analysis
mailing-list
stack-overflow
fasm
fbloginview
rangy
cname
live-streaming
ex
cuba-platform
corona
orange-api
pinterest
fosuserbundle
nullreferenceexception
deepfreeze
pfobject
android-custom-view
spyder
data-type-conversion
sharedpreferences
kamailio
ini
exchange-server-2010
quartz.net
ratio
hevc
points
tf-idf
jackrabbit-oak
annotation-processing
boolean-logic
tsung
ibm-connections
series
winrm
forms-authentication
strapi
cloudera-sentry
spooler
nothing
renderman
sigsegv
portability
degrees
front-camera
cognos-tm1
prefetch
streamwriter
tablespace
between
dojo-build
perforce-integrate
wicked-pdf
strpos
android-async-http
mnesia
onepage-checkout
pack
enunciate
smart-tv
html.actionlink
google-maps-api-2
dnx50
asp.net-web-api-helppages
knife
gql
incron
adhoc-polymorphism
multivariate-testing
visual-studio-6
nidaqmx
code-complexity
neo4jphp
cidr
roxy-fileman
django-sites
ggts
xsd2code
.net-remoting
acceptance-testing
web-frameworks
semicolon
xalan
jquery-dialog
daap
chronometer
server-name
qtextbrowser
asio
winsxs
bll
regression-testing
eaccelerator
tabbarcontroller
iphone-sdk-4.3
.net-services
downloadfile

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App