Retour aux Insights

La corruption silencieuse : pourquoi vérifier la taille d'un fichier ne suffit pas

Pierre FrinSeptembre 20267 min de lecture
source.csv 412 Mo ✓ SFTP ⚡ coupure destination.csv 412 Mo ✓ mais tronqué Vérification : ✓ Données : ✗ SFTP . AZURE BLOB . INTÉGRITÉ FICHIER . ADOBE CAMPAIGN . SALESFORCE DATA CLOUD

A file arrives. It weighs 412 MB. The expected file weighs 412 MB. The size check passes. The workflow continues. The load triggers. Data integrates into your Datahub or Data Cloud.

And a few hours later, your marketing teams report that contacts have disappeared. Segments are wrong. Campaigns are sent on truncated databases.

The corruption was there from the start. Silent.

What actually happened

During an SFTP transfer to Azure Blob Storage, the connection dropped mid-transfer. The file was created on the destination side. Its size matched what had been transferred up to the interruption, not what should have been transferred.

The source file was intact. The destination file was truncated. And both weighed exactly the same number of bytes according to the verification system, because that system wasn't comparing source size with destination size. It was only checking that the destination size was greater than zero.

A file size check without a reference comparison does not detect truncation. It detects the complete absence of a file, and nothing else.

Why size checking alone is not enough

There are several forms of silent corruption in a file pipeline:

  • Truncation: the transfer drops, the file is created with what was received. The size is less than expected, but if you don't know the expected size, you won't see it.
  • Block corruption: the file arrives at the correct size but certain blocks are altered during transit. Size is correct. Content is not.
  • Partial encoding: an encoding error during compression or conversion creates a readable but incomplete file across certain line ranges.
  • Empty file validated: a 0-byte file with the right name passes an existence check. Without a minimum threshold, it enters the pipeline.

What Adobe Campaign Datahub does natively: almost nothing

Adobe Campaign Classic and Campaign v8 offer file transfer activities with existence verification options. But file integrity verification, MD5 checksum, source/destination size comparison, row counting, is not native. It must be implemented in JavaScript activities or Shell scripts called from the workflow.

On a Datahub connected to Azure Blob, integrity verification responsibility falls entirely on the team designing the import workflow. The platform loads what it receives, without validating what it should have received.

What Salesforce Data Cloud does natively: not better

Salesforce Data Cloud offers ingestion connectors (Ingestion API, Cloud Storage Connector) with validation jobs. These jobs check format, schema, field types. They do not check whether the file received matches the file sent.

A correctly-formatted truncated file, with the right columns and types, integrates into Data Cloud without error. The validation job turns green. The loaded data is incomplete.

Neither Adobe Campaign nor Salesforce Data Cloud natively compare the received file size or checksum against the source. Integrity validation is an architecture project your teams must drive.

The robust workflow: three layers of protection

01
Verify downloaded size vs source size
The source system publishes a manifest file (or SFTP header) with the expected size. After transfer, destination size is compared against the reference. Any discrepancy greater than 0 bytes triggers an alert and blocks the pipeline.
02
Automatic retries with exponential backoff
If verification fails, the workflow doesn't crash, it retries the transfer after an increasing delay (1 min, 5 min, 15 min). Three consecutive failures trigger an operational alert and suspend the pipeline.
03
Repair pass on missing rows
If truncation is detected after a partial initial load, a repair pass identifies missing primary keys, re-downloads only the absent rows from the source, and injects them via upsert without reloading the entire file.

What this changes on Adobe Campaign and Salesforce Data Cloud

Adobe Campaign

  • JavaScript activity after Transfer File to compare received size vs manifest
  • Error transition to retry activity with attempt counter
  • Audit log in a transfer tracking table
  • Operational alert via workflow notification on multiple failure

Salesforce Data Cloud

  • MD5 checksum validation before triggering the ingestion job
  • Row count comparison after ingestion vs expected count (manifest file)
  • Webhook or Flow triggered on discrepancy to restart transfer
  • Targeted upsert on missing records via Ingestion API

The principle to remember

A file pipeline into a CRM is reliable only when three conditions are met: received size is verified against a reference, content integrity is validated by checksum or row count, and the pipeline knows what to do on failure without manual intervention.

Without these three layers, you have a pipeline that works until the day it doesn't, and you only find out by looking at your campaigns.

The question to ask on every file pipeline in production: "If this file arrives 30% truncated, does our system detect it before loading the data?" If the answer isn't immediate, you have your next priority.

This topic is directly linked to the integration architecture I described in my article on Salesforce and Snowflake synchronisation: the robustness of a data pipeline is not measured when everything works, but when a connection drops at the wrong moment.

Pierre Frin
Consultant CRM · Adobe Campaign · Salesforce · Imagino · Grokium
Online training

Go further with Adobe Campaign Classic V8

8 modules, 24 lessons for reliable production code: queryDef, JavaScript workflows, JSSP, webApps, APIs and deployment. Permanent access, fully commented code.

Discover the training →

Un audit de vos pipelines de données CRM ?

Cartographie des flux de fichiers, vérification des mécanismes d'intégrité en place, recommandations d'architecture. Cadrage gratuit, sans engagement.

Contact →
Going further
All technical articles Free Adobe Campaign tools Contact me