shapes

Operator

shapes — select one value of each shape

Synopsis

shapes [<expr>]

Description

The shapes operator is a syntactic shortcut for

val:=any(<expr>) by typeof(<expr>) | values val

If <expr> is not provided, this is used.

In other words, shapes produces one value of each type in the input. This is useful for data exploration when you want to see the shapes of data and some sample data in a data set without having to sift through it all to slice and dice it.

Examples

A simple sample

shapes | sort this
1
2
3
"foo"
"bar"
10.0.0.1
10.0.0.2
Loading...

Sampling record shapes

shapes | sort a
{a:1}
{a:2}
{s:"foo"}
{s:"bar"}
{a:3,s:"baz"}
Loading...

SuperDB