Data mapping

On this page 7

Data mapping is the specification of how each source data element corresponds to a target element, together with the transformation rules that convert values on the way. In integration and automation, it is the step that makes two systems understand each other: a CRM calls a field company_name, an ERP expects CustomerName, and the mapping states that one becomes the other, trimmed, length-checked and encoded correctly.

Every API integration, file exchange and workflow that moves records between applications contains a mapping, whether it is drawn in a visual editor, written in a transformation language or hidden in code. Its quality decides whether data arrives complete, correctly typed and semantically equivalent, or merely arrives.

How data mapping works between source and target

A mapping starts from two schemas: the source structure, such as a JSON payload, a CSV layout or a database table, and the target structure the receiving system accepts. The integrator identifies field correspondences, decides what happens to target fields without a source, and defines how every value is converted, validated or enriched before it is written.

Most mappings combine a small set of elementary operations. Recognizing them helps estimate effort, because direct copies are cheap while lookups and structural changes need reference data and testing.

OperationWhat it doesExample
Direct copyMoves a value unchangedemail to EmailAddress
Type conversionChanges the data type or formatText 2026-03-01 to an ISO 8601 timestamp
Value translationReplaces codes using a lookup tableStatus A to Active
Split or concatenateDivides or joins fieldsFull name into first and last name
Default or constantFills a required target fieldCountry set to a fixed value
Structural changeFlattens or nests records and arraysOrder lines array into separate rows
CalculationDerives a new valueNet price times quantity
Elementary operations in a data mapping

The relationship between records also matters. A mapping may be one-to-one, one-to-many when one source record produces several target records, or many-to-one when several sources are merged. Many-to-one cases require a matching key and a rule for which source wins when values conflict.

Ways to define and execute a mapping

Mappings are expressed with very different tools, and the choice affects maintainability, testability and who can change them. Automation platforms favor visual mappers, while enterprise integration relies more on declarative transformation languages.

ApproachTypical toolsStrengthWeakness
Visual field mapperWorkflow builders, iPaaS designersFast for flat structures, readable for business usersHard to version and review for complex logic
Declarative languageXSLT, JSONata, JOLT, jq, DataWeave, LiquidConcise, testable, independent of host codeRequires specialist skills
General-purpose codePython, JavaScript, C# functionsUnlimited logic and librariesMapping intent gets buried in code
Mapping specification sheetSpreadsheet listing source, target and ruleShared contract between business and ITDrifts from the implementation unless maintained
Approaches to implementing data mapping

A good practice is to keep a mapping specification as the single source of truth and to generate or verify the implementation against it. Industry formats often come with reference mappings, for example between EDI messages such as X12 or EDIFACT and ERP documents, or between HL7 version 2 and FHIR in healthcare.

Data mapping is often confused with neighboring activities. The distinction matters because each has a different owner and failure mode, as the table shows.

ConceptMain questionRelation to data mapping
Data mappingWhich field becomes which, and howThe rule set itself
Data transformationHow values are converted at run timeThe execution of the mapping rules
Schema matchingWhich fields probably correspondAn automated or assisted first draft of a mapping
API integrationHow systems exchange requests and responsesUses mappings for every payload it passes on
ETL pipelineHow data is extracted, transformed and loaded in bulkApplies mappings at scale on a schedule
PollingHow changes are detected in a sourceSupplies the records that the mapping then converts
How data mapping differs from related concepts

Architecture also shapes mapping effort. Connecting N systems point to point in both directions can require up to N times N minus 1 mappings, while a canonical data model reduces this to about two mappings per system, one into the shared model and one out of it. The trade-off is the extra work of designing and governing the canonical model.

Semantic pitfalls and how to prevent them

The hardest mapping errors are semantic, not syntactic: the data passes schema validation but means something different in the target. Two systems may both have a field called date, yet one stores the order date in local time and the other expects the delivery date in UTC.

SymptomLikely causeRemedy
Shifted dates by one dayTime zone ignored during conversionMap to explicit UTC offsets
Rounded currency amountsFloating-point type instead of decimalUse decimal types with fixed scale
Garbled accented charactersEncoding mismatch between filesEnforce UTF-8 at both ends
Silently cut textTarget field shorter than sourceValidate length and route rejects for review
Duplicate recordsNo cross-reference between system IDsMaintain an ID cross-reference table
Unknown codes in targetLookup table not updatedFail on unmapped values instead of passing them
Typical mapping defects, causes and remedies

Null handling deserves an explicit rule for every field: an empty string, a missing key and a null value can mean different things to the receiving application. Mappings should also be versioned together with the schemas they connect, because a renamed field in one API release breaks the mapping without any change on the integration side.

Testing and maintaining mappings in automated workflows

Reliable teams treat mappings as testable artifacts. They keep sample payloads with expected outputs, run them on every change and add every production defect as a new regression case. Edge cases such as empty arrays, maximum field lengths and unusual characters belong in the test set from the start.

  • Validate input and output against their schemas, so structural errors surface at the mapping step rather than in the target system.
  • Reject unmapped values loudly, because a silent default hides data quality problems for months.
  • Log the source identifier with every transformed record to make tracing and reprocessing possible.
  • Review mappings with data owners on both sides, since only they know what a field really means.

In everyday language

Data mapping is like a translation dictionary between two systems. One program writes a customer’s phone number in a box labeled Tel, another expects it in a box labeled PhoneNumber, with the country code first. The mapping lists every such pair and explains how to rewrite each value so the other side understands it.

Without it, information either gets lost or lands in the wrong place. The main point is that moving data is easy, but moving its meaning correctly takes careful rules.

Seen in the real world

An online retailer connects its web shop to a warehouse management system through an automated workflow. Every new order arrives as JSON with nested order lines, prices including tax and a shipping address in one text block. The warehouse expects one row per order line, net prices, a separate postal code field and its own carrier codes.

The integration team writes a mapping in a declarative language that flattens the lines, recalculates net prices with decimal arithmetic, splits the address and translates shipping options through a lookup table. Orders with an unknown shipping option are rejected to a review queue instead of defaulting to standard delivery. After launch, mismatched shipments disappear, and a later change in the shop’s API is caught by the regression tests before it reaches the warehouse.