Skip to content

Segment rows

fast step  binning

Create a segmentation using graphext's advanced query syntax (similar to Elasticsearch).


The following are the step's expected inputs and outputs and their specific types.

Step signature
segment_rows(ds_in: dataset, {
    "param": value
}) -> (segmentation: column)

where the object {"param": value} is optional in most cases and if present may contain any of the parameters described in the corresponding section below.


This simple query creates a new segmentation differentiating between adults and minors:

Example call (in recipe editor)
segment_rows(ds, {"adult": "age: >=18", "minor": "age: <18"}) -> (ds.segmentation)


ds_in: dataset

An input dataset to use for creating a segmentation.


segmentation: column


*param: string

The graphext advanced query used to identify the rows to include in each segment. Note that all parameters should have the same type.