evadb.EvaDBCursor.create_udf#
- EvaDBCursor.create_udf(udf_name: str, if_not_exists: bool = True, impl_path: Optional[str] = None, type: Optional[str] = None, **kwargs) EvaDBQuery [source]#
Create a udf in the database.
- Parameters:
udf_name (str) – Name of the udf to be created.
if_not_exists (bool) – If True, do not raise an error if the UDF already exist. If False, raise an error.
impl_path (str) – Path string to udf’s implementation.
type (str) – Type of the udf (e.g. HuggingFace).
**kwargs – Additional keyword arguments for configuring the create udf operation.
- Returns:
The EvaDBQuery object representing the UDF created.
- Return type:
EvaDBQuery
Examples
>>> conn.create_udf("MnistImageClassifier", if_exists = True, 'mnist_image_classifier.py')