drop

In [ ]:
drop(name: str = "", 
     cursor=None, 
     raise_error: bool = False,
     method: str = "auto",)

Drops the input relation (It can be a Model, a View, a Table, a Text Index, a Schema or a Geo Index).

Parameters

Name Type Optional Description
name
str
Relation name. If empty, it will drop all VerticaPy temporary elements.
cursor
DBcursor
Vertica DB cursor.
raise_error
bool
If the model couldn't be dropped, raises the entire error instead of displaying a warning.
method
str
Method used to drop.
  • auto : Identifies the table/view/index/model to drop. It will never drop an entire schema except if the method is set to 'schema'.
  • model : drops the input model.
  • table : drops the input table.
  • view : drops the input view.
  • geo : drops the input geo index.
  • text : drops the input text index.
  • schema : drops the input schema.

Returns

bool : True if the relation was dropped, False otherwise.

Example

In [46]:
from verticapy.utilities import drop
drop(name = "public.model_example")
Out[46]:
True