Skip to content

featurebyte.UserDefinedFunction.update_output_dtype

update_output_dtype(
output_dtype: Literal["BOOL", "CHAR", "DATE", "FLOAT", "INT", "TIME", "TIMESTAMP", "TIMESTAMP_TZ", "VARCHAR", "ARRAY", "DICT", "TIMEDELTA", "EMBEDDING", "FLAT_DICT", "UNKNOWN", "BINARY", "VOID", "MAP", "OBJECT", "STRUCT"]
)

Description

Update the output data type of the user-defined function.

Parameters

  • output_dtype: Literal["BOOL", "CHAR", "DATE", "FLOAT", "INT", "TIME", "TIMESTAMP", "TIMESTAMP_TZ", "VARCHAR", "ARRAY", "DICT", "TIMEDELTA", "EMBEDDING", "FLAT_DICT", "UNKNOWN", "BINARY", "VOID", "MAP", "OBJECT", "STRUCT"]
    The output data type of the user-defined function.

Examples

>>> cos_udf = catalog.get_user_defined_function("cos")
>>> cos_udf.update_output_dtype(DBVarType.INT)
>>> cos_udf.output_dtype
'INT'