Splunk® Cloud Services

SPL2 Search Reference

Acrobat logo Download manual as PDF


Acrobat logo Download topic as PDF

Importing SPL command functions

To use the SPL command functions you must import the functions into your modules. The SPL command functions are located in the /system/compat path.

Import a single SPL command function

To import a single command function, such as makeresults, specify that function in the import statement. For example:

import makeresults from /system/compat

Import multiple SPL command functions

To import multiple command functions, specify a comma-separated list of the names of the command functions inside a set of curly brackets { } in the import statement. For example:

import {makeresults, spath, tstats} from /system/compat

Import all of the SPL command functions

To import all of the command functions in the SPL compatibility library, use the wildcard ( * ) character in the import statement. For example:

import * from /system/compat

Import functions used with the convert command function

The convert has additional functions that you can use with the command function. To import these additional functions, specify those functions in the import statement. The following example imports the convert command function and the dur2sec function that the convert command function uses:

import {convert, dur2sec} from /system/compat

See also

Related information
Using SPL command functions
Compatibility library for SPL commands as functions
Last modified on 29 July, 2023
PREVIOUS
Compatibility library for SPL commands as functions
  NEXT
Using SPL command functions

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