# Data mapping — template From part 2 of API Integration for Analysts — cybernotes.it/trainings/api-integration/2-requirements-and-design/ One sheet per target operation or message. Copy it once per mapping. How to use it: - Start from the target: list what the receiving side needs, then find a source for each field. Starting from the source maps everything that exists and misses what is needed. - Map code lists value by value. A bulk rule such as "lowercase to uppercase" passes an unknown value through, wrongly, and nothing complains. - Whatever cannot be resolved goes in the gap log with an owner. Do not guess; ask the person who owns the value. - For every source field with no target, ask "do we care?" before dropping it. Mapping: (source system and operation) → (target system and operation) Specification versions: … Analyst: … Date: … Status: draft / gaps open / complete ## Field mapping | # | Target field | Type and format | Required? | Source field | Type and format | Rule | Personal data? | Source empty or invalid → | Status | |---|--------------|-----------------|-----------|--------------|-----------------|------|----------------|---------------------------|--------| | 1 | | | | | | | | | | The last three columns are easy to leave out. "Source empty or invalid" needs a decision per field: reject, store as unknown, or use a default — and who is told. Null, absent and empty are three different facts: known to be empty, not supplied, supplied blank. Say which the source sends and which the target expects. ## Code-list mappings One table per code list. **E1: (source list) → (target list)** | Source value | Target value | Note | |--------------|--------------|------| | | | | Rule for a source value that appears later and is not in this table: reject, or map to a catch-all and warn. Decide, and write it here. ## Source fields with no target | Source field | Do we care? | Decision | Owner | |--------------|-------------|----------|-------| | | | | | ## Gap log | ID | Description | Effect | Owner | Decision | Status | |----|-------------|--------|-------|----------|--------| | GAP-1 | | | | | open | ## Notes - *Which system is the source of truth for each entity, in which direction the data flows, and which side wins when they disagree.* - *Every row marked as personal data needs a legal basis and a retention period recorded in the requirements pack.* ## Example rows, from the training case Vehicle registry → the vehicle details stored with a claim. | # | Target field | Type and format | Required? | Source field | Type and format | Rule | Personal data? | Source empty or invalid → | Status | |---|--------------|-----------------|-----------|--------------|-----------------|------|----------------|---------------------------|--------| | 1 | `registrationNumber` | string | yes | `reg_number` | string | uppercase, remove spaces | no | reject the lookup | done | | 2 | `firstRegistrationDate` | date, YYYY-MM-DD | no | `first_reg_date` | string, DD.MM.YYYY | parse and reformat | no | store as unknown, log a warning | done | | 3 | `fuelType` | code list | no | `fuel_type` | code list, lowercase | see E1 | no | store as unknown | GAP-1 | **E1: `fuel_type` (registry) → `fuelType` (claims system)** | Source value | Target value | Note | |--------------|--------------|------| | petrol | PETROL | | | diesel | DIESEL | | | electric | ELECTRIC | | | hybrid | HYBRID | | | gas | ? | no target value exists — GAP-1 | | other | OTHER | | | ID | Description | Effect | Owner | Decision | Status | |----|-------------|--------|-------|----------|--------| | GAP-1 | No target value for the source value `gas` | vehicles with that fuel type cannot be mapped | product owner | | open | The case is synthetic. The mapping exercise among the same materials works this example through in full. CyberNotes · cybernotes.it · CC BY-SA 4.0