pyflink.table.expressions.json_array_agg#
- json_array_agg(on_null: pyflink.table.expression.JsonOnNull, item_expr) pyflink.table.expression.Expression [source]#
Builds a JSON object string by aggregating items into an array.
Item expressions can be arbitrary, including other JSON functions. If a value is NULL, the on_null behavior defines what to do.
This function is currently not supported in OVER windows, unbounded session windows, or hop windows.
Examples:
>>> # '["Apple","Banana","Orange"]' >>> orders.select(json_array_agg(JsonOnNull.NULL, col("product")))
New in version 1.12.0.