Splunk® Cloud Services

SPL2 Search Reference

Acrobat logo Download manual as PDF

Acrobat logo Download topic as PDF

apply command overview

Use the apply command to apply a machine learning model that was trained using the fit command. The apply command is part of the Splunk Machine Learning Toolkit app.

The apply command only works with models trained using the fit command.


The required syntax is in bold.

| apply <model-name>

Syntax details

For details about the apply command syntax, see Search commands for machine learning in the Splunk Machine Learning Toolkit User Guide.


Difference between SPL and SPL2 for the apply command.

Version Example
SPL apply my_model
SPL2 apply "my_model"


Model names must be in double quotation marks.

| apply "species_model"

Last modified on 31 October, 2020
SPL2 Command Quick Reference
bin command overview

This documentation applies to the following versions of Splunk® Cloud Services: current

Was this documentation topic helpful?

You must be logged into splunk.com in order to post comments. Log in now.

Please try to keep this discussion focused on the content covered in this documentation topic. If you have a more general question about Splunk functionality or are experiencing a difficulty with Splunk, consider posting a question to Splunkbase Answers.

0 out of 1000 Characters