DB_Column.map
mapfunctionskip_nothingexpected_value_type
Aliases: transform column
Documentation
Applies function
to each item in this column and returns the column of results.
Arguments
function
: The function to apply to each element ofself
column.skip_nothing
: IfTrue
,Nothing
values will be skipped. Otherwise,Nothing
values will be passed to thefunction
.expected_value_type
: The expected value type of the resulting column. IfAuto
, the value type will be inferred from the values returned byfunction
.
Examples
Multiply each element of the column by itself.
import Standard.Examples
example_map = Examples.integer_column.map (x -> x * x)
Errors
- If any of the values returned by
function
do not fit the expected value type, anInvalid_Value_Type
error is raised. - If the
function
raises a dataflow error on any row, the first such error is propagated. - If an invocation of the
function
returns a value with warnings, these warnings are attached to the overall result.