string_join
relationalai.semantics.std.aggregates
string_join(*args: AggValue, sep="", index=1) -> AggregateJoin string values with a separator.
Parameters
Section titled “Parameters”
(*argsAggValue, default:()) - String values to join.
(, default:sep"") - Separator string to use between values. Default: empty string.
(, default:index1) - Index parameter for ordering. Default: 1.
Returns
Section titled “Returns”Aggregate- AnAggregaterepresenting the computation of the joined string. ReturnsString.
Examples
Section titled “Examples”Join employee names with comma separator:
>>> select(aggregates.string_join(Employee.name, sep=", "))Join product tags per category:
>>> select(Category, aggregates.string_join(Product.tag, sep="; ").per(Category).where(Product.category == Category))