DataSourceObject represents the object from which data was sourced. In Data Cloud metadata, it connects a source system to a source-side object and its field schema. It records source identity, storage settings, contained field definitions, and configuration associated with a Directory Table data lake object (DLO).
It is not the same as DataSource, which identifies the originating system, or a data model object (DMO). A DataSourceObject can identify an associated Directory Table DMO without defining that DMO. Access to this metadata type requires the Salesforce Customize Application permission.
Key Elements
| Element | What the Element Controls |
|---|---|
fullName |
The metadata component identity, inherited from Metadata. This is distinct from the UI label and the source object's developer name. |
masterLabel |
Required. The UI name of the data source object. |
dataSource |
Required. References the DataSource component that identifies the originating system. |
sourceObject |
The developer name of the source object. |
externalDatabaseName, externalSchemaName, externalObjectName
|
Identify the external database, the schema within that database, and the external object. |
externalRecordIdentifier |
The identifier for the data source. It is not documented as a developer name. |
objectType |
Distinguishes an API, object, or table source. Salesforce documents API, Object, and Table; see the casing discrepancy below. |
storageType |
Distinguishes external from local storage. Salesforce documents External and Local; see the casing discrepancy below. |
accelerationEnabled |
Controls acceleration of data stream processing. Salesforce documents Yes and No; see the casing discrepancy below. |
dataConnection, additionalDLOInfoJson
|
For a Directory Table DLO, identify the source connector and carry additional information such as the directory path and file pattern. |
dmoDeveloperName, dmoLabel
|
Identify the Directory Table DMO by developer name and UI name. These elements do not contain the DMO definition. |
dataSourceFields |
Contains DataSourceField definitions, including field identity, data types, primary-key membership, key qualification, formulas, and date roles. |
creationType |
Records whether the object was user-added or part of a standard taxonomy. Do not apply the contained field's definitionCreationType enumeration to this string element. |
templateVersion |
The object-level version number. It is not a Metadata API version selector. |
Behavior and Constraints
Source identity and Directory Table configuration
Keep component identity, source identity, and external identity separate. fullName identifies the metadata component, sourceObject identifies the source object by developer name, and the external database, schema, and object elements describe its location in the external system. externalRecordIdentifier is a separate identifier; do not treat it as interchangeable with a developer name.
For a Directory Table DLO, dataConnection identifies the source connector, while additionalDLOInfoJson holds additional configuration such as a directory path and file pattern. The associated DMO names in dmoDeveloperName and dmoLabel describe that configuration, not an embedded DMO definition.
Contained field definitions
Each entry in dataSourceFields is a DataSourceField definition. Its required elements include datatype, externalName, masterLabel, sequence, and versionNumber. The following settings belong to these contained fields, not directly to DataSourceObject:
-
Primary keys: Supplying
primaryIndexOrdermakes the field part of the primary key. Its numeric value determines the attribute order in a compound primary key. Omitting it means the field is not part of the primary key.sequencedescribes position in the source schema; it does not establish primary-key membership. -
Key qualification:
usageTagacceptsKEY_QUALIFIERorNONE.keyQualifierNamecontains the developer name of the key qualifier field.srcKeyQualifierinstead references a source key qualifier record of typeMktDataLakeSrcKeyQualifer. These are distinct identifiers. -
External identity and data types:
externalNameis the field's name in the external system, not its developer name.externalDataTyperecords the external system's data type separately fromdatatype.dateFormat,length,precision, andscalefurther describe the field's representation. -
Required data and formulas:
isDataRequiredindicates whether data is required.isFormulaindicates that a formula is required, withfieldFormulacarrying the formula. Both boolean settings default tofalse. -
Date roles:
isEventDateindicates that an event date is required.isRecordModifiedindicates that the system tracks the record's modification date. Both default tofalse. -
Provenance: Each field has its own
definitionCreationTypeclassification. Its enumeration is not the allowed-value list for the object'screationType.
The nested versionNumber is also documented as the data source object's version. Neither it nor the object-level templateVersion selects the Metadata API version used for a request.
Deployment and Retrieval
DataSourceObject components use the dataSourceObject suffix and are stored in the mktDataSourceObjects folder. Use DataSourceObject as the metadata type when selecting source-object components in a manifest.
DataSourceField retrieval is supported only through its parent DataSourceObject. Retrieve the parent to obtain its field schema, and include the contained fields when reviewing the retrieved source-object definition. A field-only retrieval is not a substitute for retrieving the parent.
The required dataSource reference connects the source object to its originating system. DataStreamTemplate and MktDataTranObject can reference the source object in turn. These relationships help identify connected components, but they do not by themselves establish a mandatory deployment sequence.
A Data Kit definition alone may not carry the source-object schema needed for migration. A reported migration required explicitly selecting DataSourceObject and related components rather than deploying only DataPackageKitDefinition. That result was specific to an Ingestion API configuration, as detailed under Reported Issues.
Relationships
The main connection runs from a stream template or transformation object through DataSourceObject to its DataSource. The source object also contains field definitions, which can reference source key qualifier records.
References
-
DataSource:dataSource. -
DataSourceField:dataSourceFields, as contained field definitions retrieved through the parent. -
MktDataLakeSrcKeyQualifer:srcKeyQualifieron containeddataSourceFieldsentries.
Referenced By
-
DataStreamTemplate:dataSourceObject. -
MktDataTranObject:dataSourceObject.
Name-based association: dmoDeveloperName identifies the associated Directory Table DMO by developer name, while dmoLabel supplies its UI name. These names are separate from the element references listed above and do not contain the DMO definition.
Documentation Inconsistencies
Enum casing differs between Salesforce's documentation and the exposed element schema:
-
objectType: Salesforce documentsAPI,Object, andTable; the exposed schema listsApi,Object, andTable. -
storageType: Salesforce documentsExternalandLocal; the exposed schema listsEXTERNALandLOCAL. -
accelerationEnabled: Salesforce documentsYesandNo; the exposed schema listsNOandYES.
Do not assume these differently cased spellings are interchangeable in serialized metadata.
The DataSourceField documentation shows a DataSourceObject XML example, but its accompanying package.xml example names DataSource. That manifest entry identifies the source-system type, not the source-object type, and should not be read as the type name for selecting a DataSourceObject.
Reported Issues
-
A migrated Data Kit was empty when only its definition was deployed. In a January 2025 report involving an Ingestion API Connector, multiple ingestion streams, and mappings to custom and standard DMOs, deploying
DataPackageKitDefinitionalone did not carry the kit's content. The reported successful migration explicitly includedDataPackageKitDefinition,DataPackageKitObject,DataSourceBundleDefinition,DataSourceObject,DataSrcDataModelFieldMap,DataStreamTemplate,ExtDataTranObjectTemplate,FieldSrcTrgtRelationship,DataSource, andCustomObjectfor custom DMOs and custom formula fields on standard DMOs. This is a configuration-specific component list, not a universal deployment manifest. See the Data Kit migration report.
Common Questions
What is the difference between DataSourceObject, DataSource, and a DMO?
DataSource identifies the originating system. DataSourceObject describes a source-side object and its field schema. A DMO is distinct from both; the Directory Table DMO names on a source object identify associated configuration without defining the DMO.
How do I retrieve DataSourceField metadata?
Retrieve its parent DataSourceObject. DataSourceField retrieval is supported only through that parent, and the definitions appear in dataSourceFields.
Does sequence make a source field part of the primary key?
No. A supplied primaryIndexOrder establishes primary-key membership and determines the field's order in a compound primary key. sequence only describes the field's position in the source schema.
Why did deploying DataPackageKitDefinition create an empty Data Kit?
The definition alone may not include the components needed to migrate the kit's content. In the reported Ingestion API migration, the successful deployment explicitly included DataSourceObject and related source, stream, mapping, kit membership, and DMO components.
What permission is required to access DataSourceObject metadata?
The Salesforce Customize Application permission is required to access this metadata type.