DataStreamDefinition defines data ingestion configuration, including connection, API, extraction, and file-retrieval settings. It connects a data source to the landing entity where ingested data is stored and can identify an intermediate object that transports information from the source to that target.
Keep the three source identifiers separate: dataConnector references the connector, dataConnectorType identifies the kind of ingestion source, and dataSource identifies the origin. The landing target is identified separately by mktDataLakeObject.
Key Elements
| Element | What the Element Controls |
|---|---|
dataConnector |
Required reference to ExternalDataConnector. Its published description conflicts with this reference role; see Documentation Inconsistencies. |
dataConnectorType |
The ingestion source type. It has a documented set of allowed values even though the exposed schema represents it as a string. |
dataSource |
Required reference to DataSource, usually expressed as an API name or unique system identifier. A Marketing Cloud enterprise identifier can use the pattern MC_<EID>. |
mktDataLakeObject |
Required reference to the CustomObject that serves as the landing entity where data is stored. |
mktDataTranObject |
Reference to MktDataTranObject, the object used to transport information from the source to the landing entity. |
dataExtractMethods |
Selects how data is identified for extraction: FULL_REFRESH, DATETIME_CDC, or NUMERIC_CDC. The enumerated value BINARY_CDC is reserved for future use. |
dataExtractField |
Names the transport field used for change data capture (CDC), which identifies changes for extraction. Recognized as a reference to CustomField. |
fileNameWildcard |
Identifies a file or a file-selection pattern containing *. |
bulkIngest |
When true, aggregates matching files before ingestion when the file names contain a wildcard. |
isLimitedToNewFiles |
When true, limits file retrieval to new files. This is separate from file aggregation. |
isMissingFileFailure |
When true, treats missing files as a failure. |
areHeadersIncludedInFile |
Indicates whether headers are present for a single-file stream. It is not documented as a general header policy for every ingestion source. |
definitionCreationType |
Documented as required. Records the source of object or field creation. Its name and allowed values differ from the exposed creationType element. |
dataExtensionIdentifier |
Holds the unique identifier of a Marketing Cloud data extension. |
dataPlatDataSetBundle |
Identifies the originating data set bundle, helping distinguish configurations when the same item is configured across data connections. |
Behavior and Constraints
Access to DataStreamDefinition requires the Salesforce CustomizeApplication permission.
Extraction and file selection
FULL_REFRESH selects full-refresh extraction. DATETIME_CDC and NUMERIC_CDC select CDC extraction methods, with dataExtractField naming the transport field used for CDC. The presence of BINARY_CDC in the enumeration does not establish usable extraction support.
For file-based ingestion, selection, aggregation, and retrieval restrictions are separate controls. For example, fileNameWildcard can contain profiles*.csv; setting bulkIngest to true aggregates the matching files before ingestion. Setting isLimitedToNewFiles to true restricts retrieval to new files rather than enabling aggregation. Independently, isMissingFileFailure determines whether missing files are treated as a failure.
Interpret areHeadersIncludedInFile within its documented single-file-stream scope, rather than applying it as a universal header setting across connectors.
Connector and source identity
The documented allowed values for dataConnectorType are ACCOUNTENGAGEMENT, AwsS3, AzureBlob, BIG_QUERY, CuratedEntity, DataCloud, ExternalPlatform, GoogleCloudStorage, IngestApi, REDSHIFT, SalesforceCommerceCloud, SalesforceDotCom, SalesforceInteractionStudio, SalesforceMarketingCloud, SFTP, Snowflake, StreamingApp, and UPLOAD.
These values identify source types; they do not replace the dataConnector reference or the dataSource origin identifier. For Marketing Cloud, the enterprise identifier in dataSource is also distinct from the data extension's unique identifier in dataExtensionIdentifier.
dataPlatformDataSetItemName names the associated Data Platform Set Item. It complements dataPlatDataSetBundle, which identifies the bundle from which the definition originated.
Deployment and Retrieval
DataStreamDefinition components use the suffix dataStreamDefinition and are stored in the dataStreamDefinitions folder.
The documented required elements are dataConnector, dataSource, mktDataLakeObject, definitionCreationType, description, and masterLabel. The last two provide descriptive context and the UI label; neither replaces a connector, source, or target identifier.
When preparing metadata, account for the definitionCreationType versus creationType mismatch described below. Do not assume that renaming one element to the other preserves the same contract or allowed values.
The connector, source, transport object, CDC field, and landing target form the meaningful dependency structure. Those relationships support source-to-target impact analysis, but they do not by themselves establish a mandatory deployment order.
Relationships
The references connect ingestion configuration to its connector and source, an optional transport object and CDC field, and the landing target. These are element references, not naming conventions or proof that every definition uses every relationship.
References
-
ExternalDataConnector:dataConnector. -
CustomField:dataExtractField. -
DataSource:dataSource. -
CustomObject:mktDataLakeObject. -
MktDataTranObject:mktDataTranObject.
Documentation Inconsistencies
Connector reference versus creation provenance: dataConnector is a required reference to ExternalDataConnector, but its published field description says it describes whether a customer or an internal system created the definition. That description conflicts with the recognized reference role. Do not infer literal customer-versus-internal provenance values for dataConnector.
Creation element name and allowed values: Salesforce documents the required element as definitionCreationType, with allowed values Custom, Standard, ADG, Calculated_Insight, CG_Audience, Chunk, Directory_Table, External, Semantic, Transform, Vector_Embedding, Ad_Audience_Insights, Auxiliary, Clean_Room, Deletion_Records, and Problem_Records.
The exposed element schema instead uses creationType and includes those values plus Activation_Audience, Bridge, Curated, Derived, Ml_Prediction, Segment_Membership, and System. The element-name and value-set differences are consequential when interpreting or preparing metadata; the two elements must not be assumed interchangeable.
Common Questions
Where are DataStreamDefinition metadata files stored?
They are stored in the dataStreamDefinitions folder and use the suffix dataStreamDefinition. Access requires CustomizeApplication.
Does a wildcard automatically combine files before ingestion?
No. fileNameWildcard selects the files, while bulkIngest enables aggregation of matching wildcard files before ingestion. isLimitedToNewFiles separately restricts retrieval to new files.
Which CDC extraction methods can DataStreamDefinition use?
The documented CDC methods are DATETIME_CDC and NUMERIC_CDC. dataExtractField names the transport field used for CDC. BINARY_CDC is reserved for future use.
Which element identifies the target where ingested data is stored?
mktDataLakeObject is the required reference to the landing CustomObject. mktDataTranObject instead identifies an intermediate transport object.
Are creationType and definitionCreationType interchangeable?
Do not assume so. Salesforce documents definitionCreationType as required, while the exposed schema uses creationType with a broader value set. Both the element name and the allowed values differ.