make_object
Aliases: makeobject (deprecated).
make_object([options(...)]?, [key_value: storable]*) -> object
Turn a sequence of name:value elements into an object. Without arguments, returns an empty, non-null object literal.
Options
| Option | Type | Meaning |
|---|---|---|
| keep_nulls | bool | Determines whether key-value pairs with null values are kept in the object (true) or discarded (false). Default is false (discard). |
Domain
This is a scalar function (calculates a single output value for a single input row).
Categories
Examples
make_col obj:make_object(label:"speed", value:distance/(endtime-starttime), attime:endtime)
Make a new column 'obj' consisting of an object with keys 'label', 'value', and 'attime'.
make_col obj:make_object()
Make a new column 'obj' consisting of an empty object that is not 'null'.
make_col obj:make_object(options(keep_nulls:true), 'apple':string_null())
Make a new column 'obj' consisting of an object {"apple": null}.
Updated 8 days ago