UDCF response format - Teradata VantageCloud Lake

Lake - Using Queries, UDFs, and External Stored Procedures

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2025-08-12
dita:mapPath
vgj1683671089901.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
vgj1683671089901

When the AWS Lambda returns, it must format the response with a “data” key in the default JSON format. The output “data” contains a list of rows.

Scalar example of event[“data”]

Scalar UDCFs return a single row with a single field (by definition).

{
  data: [
    [0, col1], 
  ]
}

Table Operator example of event[“data”]

There can be one or more rows in a response from the AWS Lambda. There is no requirement to return a single row per input row.

The type and number of fields returned in an AWS Lambda can be given by the OUTPUT clause. This clause specifies JSON array of objects whose key is the name of the return field and the value is the type of the return field.

One or more input columns can be given in the request depending on the specification in the OUTPUT clause. If no OUTPUT clause is specified, the input schema is used as the output schema.

{
  data: [
    [0, col1, col2, col3], 
    [1, col1, col2, col3], 
    [2, col1, col2, col3], 
  ]
}