ServicesSalesforce consultingArchitectureImplementationOrg health checkDevelopmentIntegrations and APIsData migrationTesting and QAManaged supportSpecialist supportMarketing Cloud auditDeliverability
SolutionsMarketing Cloud EngagementMarketing Cloud NextSalesforce + BrazeAccount EngagementData Cloud (Data 360)Identity resolutionInsights and segmentsAgentforce and AIMCP integrationsSales and Service CloudReal-time personalisationIntegration solutionsEnterprise AI integrationBy industry
ArchitectureSalesforce CRMData 360Salesforce + BrazeAgentforceCustomer 360API-led integrationEvent-drivenMCP host, client and serverIdentity and consentMCP securityData governanceCI/CD and releasesOur public MCP server
ResourcesEngineering journalDecision guidesSolution blueprintsSalesforce productsProjects and achievementsSales ROI calculatorWhere we workChecklists and templatesPlanning toolsReadiness assessmentGlossaryAbout GeekMidstOur approachOur expertiseContact
CompanyAbout GeekMidstOur approachDelivery methodologyTrust and evidenceProjectsAchievementsBook a consultationContactWhere we workSecurity and data
Book a Consultation

Data Transforms: Batch vs Streaming

Batch transforms reshape whole data sets on a schedule; streaming transforms clean records as they arrive. Choosing the wrong one creates fragile pipelines.

Type
Article
Topic
Data Cloud
Reading time
5 min
Updated
Author
GeekMidst Team
Reviewed by
Site owner
Hand holding a glowing cloud connected to email, people and database icons

Raw source data is rarely ready to map. Emails arrive in mixed case with stray spaces, order lines need rolling up, two regional customer files need combining into one. Data Cloud gives you two tools for this: batch data transforms and streaming data transforms. They overlap a little, but they are built for different jobs, and picking the wrong one leads to slow pipelines or transforms that simply cannot express what you need.

Comparison of batch and streaming data transforms in Data Cloud across how they run, how they are built, cross-row logic, latency, typical use and main risk
Streaming transforms clean one incoming record at a time; anything that needs other rows, such as aggregation or deduplication, belongs in a batch transform. View full size

What each type is for

Batch data transforms run on a schedule or on demand over a full data set. You build them in a visual editor with nodes for joins, filters, aggregations, appends, formulas and similar operations, and write the output to a target object. They suit work that needs to see many rows at once: combining sources, deduplicating, aggregating line items to orders, or building a reshaped table for mapping.

Streaming data transforms are written in SQL and process records continuously as they land in a source Data Lake Object, writing results to a target DLO. They suit row-level work that should keep pace with ingestion: standardising formats, deriving a field, filtering out junk, or splitting a record into a cleaner shape.

The key mental model: streaming transforms look at one incoming record at a time, while batch transforms look at the whole table. Anything that needs other rows, such as aggregation, ranking or deduplication across records, belongs in batch.

Side by side

Batch data transformStreaming data transform
How it runsScheduled or on demand over the full inputContinuously as new records arrive
How you build itVisual node-based editorSQL statement
Cross-row logicJoins, aggregates, appends, deduplicationNot designed for it; row-level logic
LatencyDepends on schedule and data volumeClose to ingestion timing
Typical useRoll-ups, merges, reshaping for mappingCleaning and standardising fields
Main riskLong runs and schedule clashes upstreamPushing logic in that needs other rows

Check Salesforce Help for the current list of supported functions, join types and output targets for each transform type, because these have expanded over releases.

Before you start

The example below assumes a source DLO called Web_Signups__dll with fields signup_id__c, email__c, first_name__c, country__c and signup_ts__c, and a target DLO Web_Signups_Clean__dll that you have already created with matching fields. These are sample names. Confirm real API names in your org, and confirm the functions you use are supported in streaming transforms.

A worked example: cleaning sign-ups as they arrive

The goal is to standardise email and country before mapping, and to drop obvious test sign-ups, without waiting for a nightly job.

sql
SELECT
  s.signup_id__c                    AS signup_id__c,
  LOWER(TRIM(s.email__c))           AS email__c,
  TRIM(s.first_name__c)             AS first_name__c,
  UPPER(TRIM(s.country__c))         AS country__c,
  s.signup_ts__c                    AS signup_ts__c
FROM Web_Signups__dll s
WHERE s.email__c IS NOT NULL
  AND LOWER(s.email__c) NOT LIKE '%@example.com'
  AND LOWER(s.email__c) NOT LIKE 'test%'
Streaming transform sketch: row-level cleaning only, written to a target DLO you then map

Every line operates on the current record alone. There is no GROUP BY, no window function and no join to another table. You then map Web_Signups_Clean__dll to Individual and Contact Point Email rather than mapping the raw DLO.

Now suppose the business also wants one row per email address, keeping the most recent sign-up. That needs to compare rows, so it moves to a batch transform: a node that groups or ranks by email and keeps the latest timestamp, scheduled ahead of identity resolution.

Choosing between them

Ask four questions:

  1. Does the logic need more than one row? If yes, batch.
  2. Does a downstream use case need the result within minutes? If yes, and the logic is row-level, streaming.
  3. Is the input large and the logic heavy? Batch, scheduled with time to finish before resolution and insights run.
  4. Could the source system do this better? Sometimes the cleanest fix is upstream, in the extract or the application form.

It is common, and sensible, to chain them: a streaming transform for cleaning, followed by a batch transform for deduplication or roll-up.

Common mistakes and how to diagnose them

  • Forcing aggregation into streaming SQL. The editor will reject it, or the logic will not do what you think. Move it to batch.
  • Mapping the raw DLO as well as the clean one. Both feed identity resolution and you get duplicates. Map only the transformed output for that source.
  • Batch runs overlapping upstream refreshes. A transform that starts before ingestion completes processes partial data. Check run histories and adjust schedules.
  • Silent type changes. A text date cast inconsistently becomes null. Profile the target DLO after the first run and compare counts with the source.
  • No owner for transform logic. Transforms quietly encode business rules. Document each one in your data dictionary.

Monitoring transforms after go-live

A transform that worked on launch day can fail quietly months later when a source adds a column, changes a data type or sends an unexpectedly large file. Check run history for failed or unusually long batch runs, compare source and target row counts on a schedule, and alert someone when the gap moves outside an agreed range. Treat a transform failure the same way as an ingestion failure: everything downstream, including identity resolution and segment counts, is affected.

Checklist

  • Transform type chosen against the four questions above.
  • Source and target DLO names, fields and types confirmed.
  • Only the transformed output mapped to DMOs for that source.
  • Row counts compared between source and target after first run.
  • Schedules sequenced: ingestion, transforms, resolution, insights, segments.
  • Logic documented with an owner.

Workflow diagram

Explore how the pieces fit together. Select a step to read what happens there.

Workflow

Data streams to data lake objects

Open full size
Data streams to data lake objectsA data stream is given a category and a primary key, using a formula field when the source has no single unique key. Records are stored in a data lake object, and an optional data transform writes a cleaned DLO before mapping.Data streams to data lake objectsData streamData adminData lakeYesNoYesNoSource object: From a connector. The admin picks the source object or file for the stream. One source object normally becomes one data stream and one data lake object.Source objectFrom a connectorSet the category: Profile, Engagement. Category affects how the data can be used. Engagement data needs an event time field. Choose carefully, because changing the category later usually means rebuilding the stream.Set the categoryProfile, EngagementUnique key in source?. Every data stream needs a primary key that is unique per row. Check for duplicates in the source before relying on a field that only looks unique.Unique key insource?Set primary key: Unique source field. The chosen field identifies each row, so later loads update the existing record instead of adding a copy.Set primary keyUnique source fieldFormula field key: Combines fields. When no single field is unique, a formula field can combine several (for example order number and line number) into a key that is, and is set as the primary key.Formula field keyCombines fieldsData lake object: Raw, source shape. Records are stored as ingested, with source field names. Keep the DLO close to the source so that problems can be traced back to the system that sent them.Data lake objectRaw, source shapeNeeds clean-up?. Decide whether values must be standardised, filtered or joined before mapping, for example trimming phone numbers or dropping test records.Needs clean-up?Data transform: Batch or streaming. A batch or streaming data transform reads one or more DLOs and writes a new, cleaned DLO. Keep the logic simple and documented; it runs on every refresh.Data transformBatch or streamingDLO ready: Next: map to DMOs. The raw or transformed DLO is now ready to be mapped to data model objects, which is where data from different sources starts to line up.DLO readyNext: map to DMOsStartProcess stepDecisionDataEnd or outcomeOriginal GeekMidst explanatory diagram, not an official Salesforce reference.

Select any step in the diagram, or use Step through, to see what happens at that point and why.

Text version: every step in order
  1. Source object Data streamFrom a connector

    The admin picks the source object or file for the stream. One source object normally becomes one data stream and one data lake object.

    Next: Set the category

  2. Set the category Data streamProfile, Engagement

    Category affects how the data can be used. Engagement data needs an event time field. Choose carefully, because changing the category later usually means rebuilding the stream.

    Next: Unique key in source?

  3. Unique key in source? Data stream

    Every data stream needs a primary key that is unique per row. Check for duplicates in the source before relying on a field that only looks unique.

    Next: Yes: Set primary key; No: Formula field key

  4. Formula field key Data adminCombines fields

    When no single field is unique, a formula field can combine several (for example order number and line number) into a key that is, and is set as the primary key.

    Next: Data lake object

  5. Set primary key Data streamUnique source field

    The chosen field identifies each row, so later loads update the existing record instead of adding a copy.

    Next: Data lake object

  6. Data lake object Data lakeRaw, source shape

    Records are stored as ingested, with source field names. Keep the DLO close to the source so that problems can be traced back to the system that sent them.

    Next: Needs clean-up?

  7. Needs clean-up? Data lake

    Decide whether values must be standardised, filtered or joined before mapping, for example trimming phone numbers or dropping test records.

    Next: Yes: Data transform; No: DLO ready

  8. Data transform Data adminBatch or streaming

    A batch or streaming data transform reads one or more DLOs and writes a new, cleaned DLO. Keep the logic simple and documented; it runs on every refresh.

    Next: DLO ready

  9. DLO ready Data lakeNext: map to DMOs

    The raw or transformed DLO is now ready to be mapped to data model objects, which is where data from different sources starts to line up.

    End of the flow.

A data stream is given a category and a primary key, using a formula field when the source has no single unique key. Records are stored in a data lake object, and an optional data transform writes a cleaned DLO before mapping. Original GeekMidst explanatory diagram; not an official Salesforce reference architecture.

Want a second opinion on your transform design?

We can review your transforms and schedules, move logic to the right place and document it so your team can maintain it.

Request a technical assessment →

Tell us what you are trying to fix.

Share your Salesforce setup, goals and constraints. A practitioner reads every message and replies with questions, first thoughts or an honest view of whether you need outside help at all.

Talk to a Salesforce Expert
Book a Consultation