td_delete_model() | Teradata R Package - 17.00 - td_delete_model() - Teradata R Package

Teradata® R Package User Guide

prodname
Teradata R Package
vrm_release
17.00
created_date
November 2020
category
User Guide
featnum
B700-4005-090K

Use the td_delete_model() function to remove the information of a saved model from the Model Catalog, and optionally also delete the model tables associated with the model.

A model can only be deleted by its creator.

The required argument name specifies the name of the model to be deleted.

The optional argument delete.objects specifies whether to drop the related model objects as well.
  • If TRUE, the model objects related to the model are deleted/dropped.
  • If FALSE, only the information from the catalog will be removed. This is the default value.

Example Prerequisites

Follow the steps in td_save_model() to create and save a model.

Example 1: Only delete model information from the Model Catalog.

> td_delete_model('glm_model')
Deleted the model 'glm_model' successfully.
Model Objects that can be dropped: "alice"."r__t__sqlmr_stdout_1594617222690011 ", "alice"."r__t__td_glm_mle0_1594617222126955".

Example 2: Delete model information from the Model Catalog and drop model objects as well.

  • Save the mode again with a different name.

    This example will not work without saving the model again if Example 1 above is executed, since the model would already have been deleted.

    > td_save_model(model = td_glm_out1, name = "glm_model_2", description = "GLM test 2")
  • Delete model information from the Model Catalog and drop model objects as well.
    > td_delete_model('glm_model_2', TRUE)
    Deleted the model 'glm_model_2' successfully.
    Model Objects dropped successfully.