MLDataDefinition

Represents a modeling data definition, which specifies the data used to create a model. Such data can include filters, fields to include, fields to exclude, and so on.

Parent Type 

This type extends Metadata and inherits its fields.

File Suffix and Directory Location 

MLDataDefinition components have the suffix .mlDataDefinition and are stored in the mlDataDefinitions folder.

Version 

Introduced in API version 50.0.

Fields 

developerName 

  • Type: string
  • Required: Yes
  • Description: Required. Represents the name of the data definition. Can contain only underscores and alphanumeric characters and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. Only users with View DeveloperName OR View Setup and Configuration permission can view, group, sort, and filter this field.

entityDeveloperName 

  • Type: string
  • Required: Yes
  • Description: Required. The developer name of the object from which the model data is retrieved. After the MLDataDefinition entity is created, entityDeveloperName can’t be updated.

excludedFields 

  • Type: string[]
  • Required: No
  • Description: Fields that are excluded from the model.

includedFields 

  • Type: string[]
  • Required: No
  • Description: Fields that are included in the model.

joinFields 

  • Type: MLField[]
  • Required: No
  • Description: Reserved for future use.

parentDefinitionDevName 

  • Type: string
  • Required: Yes
  • Description: Reserved for future use.

scoringFilter 

  • Type: MLFilter
  • Required: No
  • Description: Specifies records to which the prediction scores are written.

segmentFilter 

  • Type: MLFilter
  • Required: No
  • Description: This field further filters data used in training and scoring when segmentFilter is combined with both scoringFilter and trainingFilter. For example, select all records in a specific region.

trainingFilter 

  • Type: MLFilter
  • Required: No
  • Description: Specifies the records that make up the training set.

type 

  • Type: MLDataDefinitionType (enumeration of type string)

  • Required: Yes

  • Description: Required.

    After the model is created, type can’t be updated.

  • Possible values:

    • Candidate
    • Interaction
    • Prediction
    • Recipient

MLField Type 

Represents a single field in the data definition.

Version 

Introduced in API version 50.0.

Fields 

entity 

  • Type: string
  • Required: No
  • Description: Required. The object that contains the field.

field 

  • Type: string
  • Required: No
  • Description: Required. The name of the field.

relatedField 

  • Type: MLField
  • Required: No
  • Description: Reserved for future use.

relationType 

  • Type: MLRelationType (enumeration of type string)
  • Required: No
  • Description: Reserved for future use.
  • Possible values:
    • Full
    • Inner
    • Leftinner
    • Leftouter

type 

  • Type: MLFieldType (enumeration of type string)
  • Required: Yes
  • Description: Required. How the field is used in a prediction.
  • Possible values:
    • Excluded
    • Expression
    • Included
    • Join
    • Prediction
    • Pushback
    • Related
    • SourceDate

MLFilter Type 

Represents a data filter based on a data comparison. For each comparison, there’s a left-hand element, an operator, and a right-hand element. For each record, only one of these left-hand elements is populated: lhFilter, lhPredictionField, or lhValue. Similarly, for each record, only one of these right-hand elements is populated: rhFilter, rhPredictionField, or rhValue.

Version 

Introduced in API version 50.0.

Fields 

filterName 

  • Type: string
  • Required: Yes
  • Description: Required. Name of the filter.

lhFilter 

  • Type: MLFilter
  • Required: No
  • Description: Left-hand filter condition.

lhPredictionField 

  • Type: string
  • Required: No
  • Description: Left-hand prediction field.

lhType 

  • Type: AIValueType (enumeration of type string)
  • Required: No
  • Description: The value type if a left-hand value is specified.
  • Possible values:
    • Boolean
    • Comparison
    • Currency
    • Date
    • DateTime
    • Number
    • String
    • Supplier
    • Varchar

lhUnit 

  • Type: AIFilterUnit (enumeration of type string)
  • Required: No
  • Description: The unit if a left-hand filter is specified.
  • Possible values:
    • Milliseconds
    • Seconds
    • Minutes
    • Hours
    • Days
    • Weeks
    • Months
    • Years

lhValue 

  • Type: string
  • Required: No
  • Description: The left-hand value.

operation 

  • Type: AIFilterOperation (enumeration of type string)
  • Required: Yes
  • Description: Required.
  • Possible values:
    • And
    • Or
    • Not
    • LessThan
    • LessThanOrEqual
    • GreaterThan
    • GreaterThanOrEqual
    • Equals
    • NotEquals
    • Add
    • Subtract
    • Multiply
    • Divide
    • IsNull
    • IsNotNull
    • StartsWith
    • EndsWith
    • Contains
    • Concat
    • DoesNotContain
    • Between
    • In

rhFilter 

  • Type: MLFilter
  • Required: No
  • Description: Right-hand filter condition.

rhPredictionField 

  • Type: string
  • Required: No
  • Description: Right-hand prediction field.

rhType 

  • Type: AIValueType (enumeration of type string)
  • Required: No
  • Description: The value type if a right-hand value is specified.
  • Possible values:
    • Boolean
    • Comparison
    • Currency
    • Date
    • DateTime
    • Number
    • String
    • Supplier
    • Varchar

rhUnit 

  • Type: AIFilterUnit (enumeration of type string)
  • Required: No
  • Description: The unit if a right-hand filter is specified.
  • Possible values:
    • Milliseconds
    • Seconds
    • Minutes
    • Hours
    • Days
    • Weeks
    • Months
    • Years

rhValue 

  • Type: string
  • Required: No
  • Description: The right-hand value.

sortOrder 

  • Type: int
  • Required: No
  • Description: Specifies the order of operations for evaluating the expressions. For example, if you have two conditions, this field specifies which condition is evaluated first.

Wildcard Support in the Manifest File 

This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.