DataSourceField

Represents the details of a data source field.

Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.

Important

Parent Type

This type extends the Metadata metadata type and inherits its fullName field.

File Suffix and Directory Location

DataSourceField components have the suffix .dataSourceField and are stored in the dataSourceFields folder.

Version

DataSourceField components are available in API version 52.0 and later.

Special Access Rules

You need the Salesforce Customize Application permission to access this metadata type.

Fields

Field Name Field Type Description
datatype string Required. Indicates the data type of the field: text, number, or date.
dateFormat string The date format of date, time, date/time fields.
definitionCreationType DefinitionCreationType (enumeration of type string) Describes whether this object was added by the user or as part of a standard taxonomy. Available in API version 62.0 and later. Valid values are:
  • Activation_Audience (Reserved for internal use only)
  • ADG
  • Activation_Audience. Available in API version 63.0 and later.
  • Bridge
  • Calculated_Insight
  • CG_Audience
  • Chunk
  • Curated
  • Custom
  • Derived
  • Directory_Table
  • External
  • Ml_Prediction
  • Segment_Membership
  • Semantic
  • Standard
  • System
  • Transform
  • Vector_Embedding
externalDataType string The type of data in the external system. Available in API version 63.0 and later.
externalName string Required. Name of the object in the external system. This is different from the developer name.
fieldFormula string Used for formulas.
isDataRequired boolean If true, data is required. Default value is false.
isEventDate boolean If true, an event date is required. Default value is false. Available in API version 63.0 and later.
isFormula boolean If true, a formula is required. Default value is false.
isRecordModified boolean If true, the system tracks the modification date of the record. Default value is false. Available in API version 63.0 and later.
keyQualifierName string

Contains the developer name of the keyQualifier field. Available in API version 62.0 and later.

length int Length of a string column.
masterLabel string Required. Field label.
precision int The total number of digits in a number including decimal points. Used for currency and for numeric accuracy.
primaryIndexOrder int If supplied, indicates that this field is part of the primary key. The number value indicates the order of attributes if it’s a compound primary key. A missing value means that this field isn’t part of the primary key.
scale int The number of digits to the right of the decimal point. Used for currency and for numeric accuracy.
sequence int Required. The sequence of this source schema.
srcKeyQualifier string Contains a reference to the source key qualifier record. The source key is the MktDataLakeSrcKeyQualifer metadata type. Available in API version 55.0 and later.
usageTag usageTag (enumeration of type string) Indicates if the field is a key qualifier field. Available in API version 55.0 and later.

Values are:

  • KEY_QUALIFIER—The field is used as a key qualifier field.
  • NONE—The field isn’t used as a key qualifier field.
versionNumber double Required. The version of the data source object.

Declarative Metadata Sample Definition

This is an example of a DataSourceObject component and its fields. You can retrieve the DataSourceField component only through its parent object, DataSourceObject.

1<DataSourceObject xmlns="http://soap.sforce.com/2006/04/metadata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
2    <dataSource>test1108</dataSource>
3    <dataSourceFields>
4        <fullName>DOB</fullName>
5        <datatype>D</datatype>
6        <externalName>DOB</externalName>
7        <isDataRequired>false</isDataRequired>
8        <masterLabel>DOB</masterLabel>
9        <sequence xsi:nil="true"/>
10        <versionNumber xsi:nil="true"/>
11    </dataSourceFields>
12    <externalRecordIdentifier>individuals_20200125_000000_csv</externalRecordIdentifier>
13    <masterLabel>test1108</masterLabel>
14    <objectType>Object</objectType>
15</DataSourceObject>

The following is an example package.xml that references the previous definition.

1<types>
2        <members>test1108</members>
3        <name>DataSource</name>
4    </types>

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.