Links

TO_ARRAY

Outputs all the values from all the inputs as an array

Syntax

TO_ARRAY(inputs1[, inputs2, ..., inputsN])

Arguments

Name
Type
Description
Default Value
inputs#
any

Returns

[same as input]

Examples

inputs1
inputs2
Output
array['a', 'c']
'b'
[a, c, b]

Transformation job example

SQL

CREATE JOB function_operator_example
ADD_MISSING_COLUMNS = true
AS INSERT INTO default_glue_catalog.upsolver_samples.orders_transformed_data MAP_COLUMNS_BY_NAME
SELECT inputs1[], inputs2,
TO_ARRAY(inputs1[], inputs2) AS Output
FROM default_glue_catalog.upsolver_samples.orders_raw_data
LET inputs1 = array['a', 'c'],
inputs2 = 'b'
WHERE time_filter()
LIMIT 1;

Query result

inputs1[]
inputs2
Output
array['a', 'c']
'b'
[a, c, b]