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.