evadb.EvaDBCursor.create_table#

EvaDBCursor.create_table(table_name: str, if_not_exists: bool = True, columns: 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

>>> cursor.create_table("MyCSV", if_exists = True, columns="""
        id INTEGER UNIQUE,
        frame_id INTEGER,
        video_id INTEGER,
        dataset_name TEXT(30),
        label TEXT(30),
        bbox NDARRAY FLOAT32(4),
        object_id INTEGER"""
        )
    0
0   Table Successfully created: MyCSV