---
schema_version: "1"
id: 07ee93b47d06fb3dee2ead984c05490a32450226ccc3d4619e2de02ee1699da9
title: DataSourceField
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_datasourcefield.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_datasourcefield.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 4ea3f28077268f4887407b9f81d4808c2908409426a369c6a988cbebdc418632
description: Represents the details of a data source field.
---
# DataSourceField

Represents the details of a data source field.

![Important](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/images/icon_note_important.png)

#### Important

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.

## Parent Type

This type extends the [Metadata](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/metadata.htm "The base class for all metadata types. You can’t edit this object. A component is an instance of a metadata type.") 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

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d351181e116">Field Name</th>

              <th class="featureTableHeader  " id="d351181e119">Field Type</th>

              <th class="featureTableHeader  " id="d351181e122">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d351181e116" data-title="Field Name"><span class="keyword parmname">datatype</span></td>

              <td class="entry" headers="d351181e119" data-title="Field Type">string</td>

              <td class="entry" headers="d351181e122" data-title="Description">Required. Indicates the data type of the field: text, number, or date.</td>

            </tr>

            <tr>
              <td class="entry" headers="d351181e116" data-title="Field Name"><span class="keyword parmname">dateFormat</span></td>

              <td class="entry" headers="d351181e119" data-title="Field Type">string</td>

              <td class="entry" headers="d351181e122" data-title="Description">The date format of date, time, date/time fields.</td>

            </tr>

            <tr>
              <td class="entry" headers="d351181e116" data-title="Field Name"><span class="keyword parmname"><samp class="codeph nolang">definitionCreationType</samp></span></td>

              <td class="entry" headers="d351181e119" data-title="Field Type">DefinitionCreationType (enumeration of type string)</td>

              <td class="entry" headers="d351181e122" data-title="Description">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: <a name="ul_c2f_12c_t2c"><!-- --></a>
                <ul class="ul bulletList" id="ul_c2f_12c_t2c">
                  <li class="li">
                    <samp class="codeph nolang">Activation_Audience</samp> (Reserved for
                    internal use only)
                  </li>

                  <li class="li"><samp class="codeph nolang">ADG</samp></li>

                  <li class="li">Activation_Audience. Available in API version 63.0 and later.</li>

                  <li class="li"><samp class="codeph nolang">Bridge</samp></li>

                  <li class="li"><samp class="codeph nolang">Calculated_Insight</samp></li>

                  <li class="li"><samp class="codeph nolang">CG_Audience</samp></li>

                  <li class="li"><samp class="codeph nolang">Chunk</samp></li>

                  <li class="li"><samp class="codeph nolang">Curated</samp></li>

                  <li class="li"><samp class="codeph nolang">Custom</samp></li>

                  <li class="li"><samp class="codeph nolang">Derived</samp></li>

                  <li class="li"><samp class="codeph nolang">Directory_Table</samp></li>

                  <li class="li"><samp class="codeph nolang">External</samp></li>

                  <li class="li"><samp class="codeph nolang">Ml_Prediction</samp></li>

                  <li class="li"><samp class="codeph nolang">Segment_Membership</samp></li>

                  <li class="li"><samp class="codeph nolang">Semantic</samp></li>

                  <li class="li"><samp class="codeph nolang">Standard</samp></li>

                  <li class="li"><samp class="codeph nolang">System</samp></li>

                  <li class="li"><samp class="codeph nolang">Transform</samp></li>

                  <li class="li"><samp class="codeph nolang">Vector_Embedding </samp></li>

                </ul>
                <p class="p">Valid values available in API version 67.0 and later are: </p>
                <a name="ul_dsf_67_tjc"><!-- --></a>
                <ul class="ul bulletList" id="ul_dsf_67_tjc">
                  <li class="li"><samp class="codeph nolang">Ad_Audience_Insights</samp></li>

                  <li class="li"><samp class="codeph nolang">Auxiliary</samp></li>

                  <li class="li"><samp class="codeph nolang">Clean_Room</samp></li>

                  <li class="li"><samp class="codeph nolang">Deletion_Records</samp></li>

                  <li class="li"><samp class="codeph nolang">Problem_Records</samp></li>

                </ul>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d351181e116" data-title="Field Name"><span class="keyword parmname">externalDataType</span></td>

              <td class="entry" headers="d351181e119" data-title="Field Type">string</td>

              <td class="entry" headers="d351181e122" data-title="Description">The type of data in the external system. Available in API version 63.0 and
                later.</td>

            </tr>

            <tr>
              <td class="entry" headers="d351181e116" data-title="Field Name"><span class="keyword parmname">externalName</span></td>

              <td class="entry" headers="d351181e119" data-title="Field Type">string</td>

              <td class="entry" headers="d351181e122" data-title="Description">Required. Name of the object in the external system. This is different from the
                developer name.</td>

            </tr>

            <tr>
              <td class="entry" headers="d351181e116" data-title="Field Name"><span class="keyword parmname">fieldFormula</span></td>

              <td class="entry" headers="d351181e119" data-title="Field Type">string</td>

              <td class="entry" headers="d351181e122" data-title="Description">Used for formulas.</td>

            </tr>

            <tr>
              <td class="entry" headers="d351181e116" data-title="Field Name"><span class="keyword parmname">isDataRequired</span></td>

              <td class="entry" headers="d351181e119" data-title="Field Type">boolean</td>

              <td class="entry" headers="d351181e122" data-title="Description">If <samp class="codeph nolang">true</samp>, data is required. Default value
                is <samp class="codeph nolang">false</samp>.</td>

            </tr>

            <tr>
              <td class="entry" headers="d351181e116" data-title="Field Name"><span class="keyword parmname">isEventDate</span></td>

              <td class="entry" headers="d351181e119" data-title="Field Type">boolean</td>

              <td class="entry" headers="d351181e122" data-title="Description">If <samp class="codeph nolang">true</samp>, an event date is required.
                Default value is <samp class="codeph nolang">false</samp>. Available in API
                version 63.0 and later.</td>

            </tr>

            <tr>
              <td class="entry" headers="d351181e116" data-title="Field Name"><span class="keyword parmname">isFormula</span></td>

              <td class="entry" headers="d351181e119" data-title="Field Type">boolean</td>

              <td class="entry" headers="d351181e122" data-title="Description">If <samp class="codeph nolang">true</samp>, a formula is required. Default
                value is <samp class="codeph nolang">false</samp>.</td>

            </tr>

            <tr>
              <td class="entry" headers="d351181e116" data-title="Field Name"><span class="keyword parmname">isRecordModified</span></td>

              <td class="entry" headers="d351181e119" data-title="Field Type">boolean</td>

              <td class="entry" headers="d351181e122" data-title="Description">If <samp class="codeph nolang">true</samp>, the system tracks the
                modification date of the record. Default value is <samp class="codeph nolang">false</samp>. Available in API version 63.0 and later.</td>

            </tr>

            <tr>
              <td class="entry" headers="d351181e116" data-title="Field Name"><span class="keyword parmname">keyQualifierName</span></td>

              <td class="entry" headers="d351181e119" data-title="Field Type">string</td>

              <td class="entry" headers="d351181e122" data-title="Description">
                <p dir="ltr" class="p">Contains the developer name of the <samp class="codeph nolang">keyQualifier</samp> field. Available in API version 62.0 and later.</p>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d351181e116" data-title="Field Name"><span class="keyword parmname">length</span></td>

              <td class="entry" headers="d351181e119" data-title="Field Type">int</td>

              <td class="entry" headers="d351181e122" data-title="Description">Length of a string column.</td>

            </tr>

            <tr>
              <td class="entry" headers="d351181e116" data-title="Field Name"><span class="keyword parmname">masterLabel</span></td>

              <td class="entry" headers="d351181e119" data-title="Field Type">string</td>

              <td class="entry" headers="d351181e122" data-title="Description">Required. Field label.</td>

            </tr>

            <tr>
              <td class="entry" headers="d351181e116" data-title="Field Name"><span class="keyword parmname">precision</span></td>

              <td class="entry" headers="d351181e119" data-title="Field Type">int</td>

              <td class="entry" headers="d351181e122" data-title="Description">The total number of digits in a number including decimal points. Used for
                currency and for numeric accuracy.</td>

            </tr>

            <tr>
              <td class="entry" headers="d351181e116" data-title="Field Name"><span class="keyword parmname">primaryIndexOrder</span></td>

              <td class="entry" headers="d351181e119" data-title="Field Type">int</td>

              <td class="entry" headers="d351181e122" data-title="Description">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.</td>

            </tr>

            <tr>
              <td class="entry" headers="d351181e116" data-title="Field Name"><span class="keyword parmname">scale</span></td>

              <td class="entry" headers="d351181e119" data-title="Field Type">int</td>

              <td class="entry" headers="d351181e122" data-title="Description">The number of digits to the right of the decimal point. Used for currency and
                for numeric accuracy.</td>

            </tr>

            <tr>
              <td class="entry" headers="d351181e116" data-title="Field Name"><span class="keyword parmname">sequence</span></td>

              <td class="entry" headers="d351181e119" data-title="Field Type">int</td>

              <td class="entry" headers="d351181e122" data-title="Description">Required. The sequence of this source schema.</td>

            </tr>

            <tr>
              <td class="entry" headers="d351181e116" data-title="Field Name"><span class="keyword parmname">srcKeyQualifier</span></td>

              <td class="entry" headers="d351181e119" data-title="Field Type">string</td>

              <td class="entry" headers="d351181e122" data-title="Description">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.</td>

            </tr>

            <tr>
              <td class="entry" headers="d351181e116" data-title="Field Name"><span class="keyword parmname">usageTag</span></td>

              <td class="entry" headers="d351181e119" data-title="Field Type">usageTag (enumeration of type string)</td>

              <td class="entry" headers="d351181e122" data-title="Description">Indicates if the field is a key qualifier field. Available in API version 55.0
                and later.<p class="p">Values are:</p>
                <a name="ul_drn_mzg_ncc"><!-- --></a>
                <ul class="ul bulletList" id="ul_drn_mzg_ncc">
                  <li class="li">
                    <samp class="codeph nolang">KEY_QUALIFIER</samp>—The field is used as a key
                    qualifier field.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">NONE</samp>—The field isn’t used as a key
                    qualifier field.
                  </li>

                </ul>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d351181e116" data-title="Field Name"><span class="keyword parmname">versionNumber</span></td>

              <td class="entry" headers="d351181e119" data-title="Field Type">double</td>

              <td class="entry" headers="d351181e122" data-title="Description">Required. The version of the data source object.</td>

            </tr>

          </tbody>

        </table>

## 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.

<DataSourceObject xmlns="http://soap.sforce.com/2006/04/metadata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <dataSource\>test1108</dataSource\>
    <dataSourceFields\>
        <fullName\>DOB</fullName\>
        <datatype\>D</datatype\>
        <externalName\>DOB</externalName\>
        <isDataRequired\>false</isDataRequired\>
        <masterLabel\>DOB</masterLabel\>
        <sequence xsi:nil="true"/>
        <versionNumber xsi:nil="true"/>
    </dataSourceFields\>
    <externalRecordIdentifier\>individuals\_20200125\_000000\_csv</externalRecordIdentifier\>
    <masterLabel\>test1108</masterLabel\>
    <objectType\>Object</objectType\>
</DataSourceObject\>

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

<types\>
        <members\>test1108</members\>
        <name\>DataSource</name\>
    </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](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/file_based_zip_file.htm "The deploy() and retrieve() calls are used to deploy and retrieve a .zip file. Within the .zip file is a project manifest (package.xml) that lists what to retrieve or deploy, and one or more XML components that are organized into folders.").