Fork me on GitHub


Puts numbers into custom-sized buckets. Useful for histograms.

The bucket transform allows you to put numbers into buckets of custom size.

For example, given this data:


We can choose buckets of size 10 (starting from 0 by default)


to get:

"[0,10)", "[10,20)", "[80,90)","[-10,0)","[0,10)"

The bucket transform uses interval notation. To process the range in code, you can manually change the last character from ) to ], and parse the result as a json array.


Using the bucket transform in conjunction with the map transform, it is easy to generate histograms:


Running this transform on the above data will give:

  "[-10,0)": 1,
  "[0,10)": 2,
  "[10,20)": 1,
  "[80,90)": 1

Transform Details

One-To-OneStatelessPeekInput SchemaOutput Schema
TrueTrueFalse{"type": "string"}


1The size of each bucket (float)TrueTrueFalse10
2Start location for bucketingTrueTrueFalse0

This Site


ConnectorDB is a very new open-source project. If you are a designer/developer or ML enthusiast, head on over to the connectordb github, where you can choose which part of ConnectorDB you want to contribute towards! Pull requests or bug reports are welcome!