Input/Output to APPLY_COMMAND | Open Analytics Framework | VantageCloud Lake - Input and Output to the APPLY_COMMAND - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

In CSV style, the APPLY_COMMAND reads rows from its standard input (stdin) and writes rows to its standard output (stdout). Each input row to the APPLY_COMMAND is sent as a string with the column values separated by the delimiter specified in the DELIMITER clause. If no DELIMITER clause is specified, the default is a comma. A newline character separates each input row from the next.

The output of the APPLY_COMMAND must also be a delimited string and the values are converted back to data types specified in the RETURNS clause. A newline character (\n) must separate each output row from the next.

Nulls are represented as empty strings. For example, the following example represents the input string for a row with three integer values where the last two are NULL (delimited by colons):

1::\n

The first value is 1, there is no value between the first and second delimiter, and no value between the second delimiter and the newline character. The input row is equivalent to (1, NULL, NULL).

If the return values from the APPLY_COMMAND are not in a delimited string format when the style is CSV, the APPLY table operator fails.