Teradata Package for Python Function Reference - delete_byom - Teradata Package for Python - Look here for syntax, methods and examples for the functions included in the Teradata Package for Python.
Teradata® Package for Python Function Reference
- Product
- Teradata Package for Python
- Release Number
- 17.00
- Published
- November 2021
- Language
- English (United States)
- Last Update
- 2021-11-19
- lifecycle
- previous
- Product Category
- Teradata Vantage
- teradataml.catalog.byom.delete_byom = delete_byom(model_id, table_name, schema_name=None)
- DESCRIPTION:
Delete a model from the user specified table in Teradata Vantage.
PARAMETERS:
model_id:
Required Argument.
Specifies the the unique model identifier of the model to be deleted.
Types: str
table_name:
Required Argument.
Specifies the name of the table to delete the model from.
Types: str
schema_name:
Optional Argument.
Specifies the name of the schema in which the table specified in
"table_name" is looked up. If not specified, then table is looked
up in current schema.
Types: str
RETURNS:
None.
RAISES:
TeradataMlException
EXAMPLES:
>>> import teradataml, os, datetime
>>> model_file = os.path.join(os.path.dirname(teradataml.__file__), 'data', 'models', 'iris_kmeans_model')
>>> from teradataml import save_byom, delete_byom
>>> save_byom('model3', model_file, 'byom_models')
Model is saved.
>>> save_byom('model4', model_file, 'byom_models', schema_name='test')
Model is saved.
>>>
# Example 1 - Delete a model with id 'model3' from the table byom_models.
>>> delete_byom(model_id='model3', table_name='byom_models')
Model is deleted.
>>>
# Example 2 - Delete a model with id 'model4' from the table byom_models
# and the table is in "test" DataBase.
>>> delete_byom(model_id='model4', table_name='byom_models', schema_name='test')
Model is deleted.
>>>