Documentation Home
HeatWave User Guide
Related Documentation Download this Manual
PDF (US Ltr) - 3.8Mb
PDF (A4) - 3.8Mb


6.9.5 Delete a Model

Users that create models or have the required privileges to a model on the MODEL_CATALOG table can delete them.

Before You Begin

Delete a Model

To delete a model from the model catalog table:

  1. Query the model catalog table for the model_id, model_owner, and train_table_name. Identify the model_id for model you want to delete. Replace user1 with your own user name.

    mysql> SELECT model_id, model_owner, train_table_name FROM ML_SCHEMA_user1.MODEL_CATALOG;
    +----------+-------------+-----------------------------------------------+
    | model_id | model_owner | train_table_name                              |
    +----------+-------------+-----------------------------------------------+
    |        1 | user1       | ml_benchmark.sentiment_model_creation         |
    |        2 | user1       | ml_data.iris_train                            |
    |        3 | user1       | census_data.census_train                      |
    +----------+-------------+-----------------------------------------------+
    3 rows in set (0.0008 sec)

    The requested columns from the model catalog table display.

    In this case, the model with model_id 3 is deleted.

  2. Delete the model from the model catalog table.

    mysql> DELETE FROM ML_SCHEMA_user1.MODEL_CATALOG WHERE model_id = 3;

    Where:

    • ML_SCHEMA_user1.MODEL_CATALOG is the fully qualified name of the MODEL_CATALOG table. The schema is named for the user that created the model.

    • model_id = 3 is the ID of the model you want to delete.

  3. Confirm the model is removed from the model catalog table. Replace user1 with your own user name.

    mysql> SELECT model_id, model_owner, train_table_name FROM ML_SCHEMA_user1.MODEL_CATALOG;
    +----------+-------------+-----------------------------------------------+
    | model_id | model_owner | train_table_name                              |
    +----------+-------------+-----------------------------------------------+
    |        1 | user1       | ml_benchmark.sentiment_model_creation         |
    |        2 | user1       | ml_data.iris_train                            |
    +----------+-------------+-----------------------------------------------+
    2 rows in set (0.0008 sec)

What's Next