DROP MODEL - Amazon Redshift

DROP MODEL

Removes a model from the database. Only the model owner or a superuser can drop a model.

DROP MODEL also deletes all the associated prediction function that is derived from this model, all Amazon Redshift artifacts related to the model, and all Amazon S3 data related to the model. While the model is still being trained in Amazon SageMaker AI, DROP MODEL will cancel those operations.

This command isn't reversible. The DROP MODEL command commits immediately.

Required permissions

Following are required permissions for DROP MODEL:

  • Superuser

  • Users with the DROP MODEL permission

  • Model owner

  • Schema owner

Syntax

DROP MODEL [ IF EXISTS ] model_name

Parameters

IF EXISTS

A clause that indicates that if the specified schema already exists, the command should make no changes and return a message that the schema exists.

model_name

The name of the model. The model name in a schema must be unique.

Examples

The following example drops the model demo_ml.customer_churn.

DROP MODEL demo_ml.customer_churn