Outtypecallback function
Function to define the column names, output data types, length/precision, and scale of the data being returned to Vertica.
Function to define the column names, output data types, length/precision, and scale of the data being returned to Vertica.
Example
SalesTaxReturnTypes <- function(arguments.data.frame, parameters.data.frame) {
output.return.type <- data.frame(datatype = rep(NA, 2),
length = rep(NA, 2),
scale = rep(NA, 2),
name = rep(NA, 2))
output.return.type$datatype <- c("float", "float")
output.return.type$name <- c("Sales Tax Rate", "Item Cost with Tax")
return(output.return.type)
}
Arguments
arguments.data.frame |
Data frame that contains the arguments passed to the UDx from Vertica. This data frame is created and used internally by the UDx process. |
parameters.data.frame |
Data frame that contains the parameters defined in the UDx from Vertica. This data frame is created and used internally by the UDx process. |
datatype |
Output data type. |
length |
(Optional) Dimension of the output. |
scale |
(Optional) Proportional dimensions of the output. |
name |
Column name of the output. |
Description
When creating the outtypecallback
function, define one row for each value returned. Use the same order as in the outtype
defined in the factory function. If any columns are left blank or the outtypecallback
function is omitted, then Vertica uses default values.
Important
When specifying LONG VARCHAR or LONG VARBINARY data types, include the space between the two words. For example:
datatype = c("long varchar")