list_transform
Apply a lambda expression to each list item and return the results as a list. The item type of the output comes from the lambda result.
Also available as apply, array_apply, array_transform, list_apply.
Try an expression
In Formula, enter the expression and set Output type to VARCHAR.
Expression
list_transform([1, 2, 3], lambda x : x + 1)Result
'[2, 3, 4]'The expression returns INTEGER[]. Formula stores it as VARCHAR in this example. To use your own data, replace the example values with column names. Keep format strings and other options as written.
Arguments and types
list_transform(list, lambda(x))- list
- List
- lambda(x)
- Lambda expression
Supported signatures (1)
list_transform(list: ANY[], lambda(x): LAMBDA) → ANY[]The result type can depend on the input types. See DuckDB for the full argument rules.
Things to know
If the first argument is missing, the result is NULL.
Function metadata from DuckDB, used under the MIT license.