init

splunkjs.Service.DataModelCalculation.init

Constructor for a data model calculation. SDK users are not expected to invoke this constructor directly.

Syntax

init: function(props)

Parameters

Name Type Description
props Object

A dictionary of properties to set:
- calculationID (string): The ID of this calculation.
- calculationType (string): The type of this calculation, see class docs for valid types.
- editable (boolean): Whether this calculation can be edited.
- comment (string): A comment for this calculation, or null if there isn't one.
- owner (string): The lineage of the data model object on which this calculation
is defined, items are delimited by a dot. This is converted into an array of
strings upon construction.
- outputFields (array): An array of the fields this calculation generates.
- expression (string): The expression to use for this calculation; exclusive to Eval and Rex calculations (optional)
- inputField (string): The field to use for calculation; exclusive to GeoIP and Rex calculations (optional)
- lookupName (string): The name of the lookup to perform; exclusive to Lookup calculations (optional)
- inputFieldMappings (array): One element array containing an object with the mappings from fields in the events to fields
in the lookup; exclusive to Lookup calculations (optional)

isEditable

splunkjs.Service.DataModelCalculation.isEditable

Is this data model calculation editable?

Syntax

isEditable: function()

Return

Boolean.

True if this data model calculation is editable.

isEval

splunkjs.Service.DataModelCalculation.isEval

Is this data model calculation of type eval?

Syntax

isEval: function()

Return

Boolean.

True if this data model calculation is of type eval.

isGeoIP

splunkjs.Service.DataModelCalculation.isGeoIP

Is this data model calculation of type GeoIP?

Syntax

isGeoIP: function()

Return

Boolean.

True if this data model calculation is of type GeoIP.

isLookup

splunkjs.Service.DataModelCalculation.isLookup

Is this data model calculation of type lookup?

Syntax

isLookup: function()

Return

Boolean.

True if this data model calculation is of type lookup.

isRex

splunkjs.Service.DataModelCalculation.isRex

Is this data model calculation of type Rex?

Syntax

isRex: function()

Return

Boolean.

True if this data model calculation is of type Rex.

outputFieldNames

splunkjs.Service.DataModelCalculation.outputFieldNames

Returns an array of strings of output field names.

Syntax

outputFieldNames: function()

Return

Array.

An array of strings of output field names.