destroy Method

Destroys the model and closes all resources used by the SAS Embedded Process for Spark.

Table of Contents

Syntax

destroy()

Details

  • This operation invalidates the current model.
  • This operation does not unpersist the input Spark Dataset that is passed to the Model class during creation. If you want to unpersist the input Spark Dataset, call the Dataset unpersist method. For example, submit ds.unpersist where ds is a variable of type Dataset.
  • An I/O exception java.io.IOException is thrown if an error occurs.

Java signature:

public void destroy() throws IOException

Example

Here are some examples:

  • Python: mymodel.destroy()
  • Scala: mymodel.destroy()
Last updated: August 19, 2026