The UDF sends input “data” in default JSON format to the AWS Lambda handler. The input “data” takes a list of rows.
- For scalar UDCFs, each entry in the list has arguments passed to the UDF in parameters order.
- For table operator UDCFs, each entry in the list has the columns passed in the ON clause.
The event argument in the AWS Lambda handler can process the input using the “data” key.
Scalar example of event[“data”]
Only a single row in the request to the AWS Lambda invocation. Multiple request rows in the data array is not supported.
Currently, only a single argument is supported for scalar UDCFs. As such, there is only a single argument along with the index
{
data: [
[0, arg1],
]
}
Table Operator example of event[“data”]
There can be one or more rows in a request to the AWS Lambda invocation.
One or more input columns can be given in the request depending on the columns in the ON clause
{
data: [
[0, col1, col2, col3],
[1, col1, col2, col3],
[2, col1, col2, col3],
]
}