Normalizing and mapping data from multiple sources into one consistent schema

Learn how to align fields, resolve synonyms, and standardize values to create a consistent schema for data from multiple sources.

6 min read3 viewsNormalizing and mapping data from multiple sources into one consistent schema
— · 0 votes
Contents
  1. What Normalization Means in Data Integration
  2. Building a Common Data Model
  3. How Schema Mapping Aligns Fields
  4. Synonym Mapping for Consistent Values
  5. Standardizing Units and Value Formats
  6. Handling Missing and Incomplete Attributes
  7. Deduplication After Normalization
  8. Implementing an Automated Pipeline
  9. Common Questions on Data Normalization and Mapping
  10. What is the difference between data normalization and schema mapping?
  11. How do you handle different names for the same attribute?
  12. Why is a controlled vocabulary important for data integration?
  13. Can normalization be fully automated?
  14. What are common challenges in normalizing data from multiple sources?
  15. How does deduplication work after normalization?

Normalizing and mapping data from multiple sources into one consistent schema is the process of transforming varied source data into a single standard format. It involves aligning field names, resolving synonyms, and standardizing values and units so all records fit the same structure. This lets you compare and combine data from different systems without manual adjustment.

  • Schema mapping defines how each source field corresponds to a field in the target schema.
  • A controlled vocabulary ensures the same values are used for the same concepts across sources.
  • Deduplication is needed after normalization when sources contain overlapping records.
  • Automated ETL pipelines can handle ongoing normalization as new data arrives.

What Normalization Means in Data Integration

Normalization in data integration means transforming values so they fit a standard format across all sources. For example, dates can be written as month first or day first. Normalization would choose one order for every record.

Units of measure also vary in source data. A listing may show size in square feet or square meters. Normalization converts each value to a chosen unit for the target schema.

Text values often need trimming and case changes. Phone numbers may include country codes or hyphens. Normalization removes this variation for consistent storage.

Building a Common Data Model

A common data model defines the final structure that all sources will map to. It includes fields, types, and allowed values. This model serves as the target for mapping and normalization.

The model should reflect the questions the data must answer. If users compare prices, include a numeric price field. If they filter by brand, use a controlled list of brand names.

A well-designed common data model balances completeness with simplicity. Avoid adding fields for rare attributes that are missing in most sources. Focus on fields that appear across the majority of the data.

How Schema Mapping Aligns Fields

Schema mapping is the step where each source field is matched to a field in the target schema. A source field named 'color' may map directly. A field named 'finish' might also represent color.

Source-to-target mapping documents these correspondences. It records whether a transformation is needed, such as splitting a full name into first and last. The mapping also notes fields that have no target and will be dropped.

Field name alignment reduces the chance of mixing unrelated data. Without alignment, 'size' in one source could mean clothing size while in another it means area. Mapping makes the meaning explicit.

Source FieldTarget FieldTransformation
colourcolorspelling correction
price_per_unitunit_pricerename
dimensionslength_cmsplit and convert

Synonym Mapping for Consistent Values

Synonym mapping replaces different words that have the same meaning with one preferred term. In listings, 'apartment' and 'flat' may both mean the same type of dwelling. The target schema may choose 'apartment'.

A controlled vocabulary is central to synonym mapping. It lists allowed values for each field. Values from sources that are synonyms map to the allowed term.

Some synonyms are spelling variants or abbreviations. 'St' and 'Street' are simple examples. Synonym mapping handles these alongside true alternatives like 'auto' and 'car'.

Standardizing Units and Value Formats

Unit standardization converts all measurements to the same unit in the target schema. Length may appear in inches, feet, or meters. The common data model picks one unit for length.

Value format standardization handles numeric and date patterns. Prices may come with currency symbols or commas. Dates may be stored as text in different separators.

Standardized values allow reliable sorting and filtering. Without it, a numeric sort would treat '100' and '1,000' as text strings. Unit conversion often requires source-specific rules.

  • Convert distances to miles or kilometers
  • Normalize dates to ISO 8601 format
  • Strip currency symbols from prices
  • Replace decimal commas with periods
  • Map 'not specified' to an empty value

Handling Missing and Incomplete Attributes

Missing attributes are common when combining sources. One source may not collect a field that another does. The target schema decides how to represent these gaps.

A blank value is the typical choice for missing data. Some models use a specific value like 'unknown' for categorical fields. The choice affects how users filter and see records.

Incomplete attributes may have partial values. A listing may provide only a price range instead of a fixed price. The mapping must decide how to store such values in a single numeric field.

Deduplication After Normalization

Deduplication across sources becomes necessary when more than one source contains the same entity. A listing may appear in two different feeds with slight variations. Normalization makes duplicates easier to detect.

A matching rule compares records on key fields such as name and address. If values match exactly or after normalization, the records are flagged as duplicates. The system can then merge them or choose one.

Deduplication is a separate step that comes after schema mapping and value standardization. Without normalized data, identical records can look different. With normalization, they become similar enough to identify.

Implementing an Automated Pipeline

A data transformation pipeline automates the steps from source to target schema. It reads source data, applies mapping and normalization, and writes to the target. Automation ensures consistent handling of new data.

ETL tools are often used for such pipelines. ETL stands for extract, transform, load. In the transform stage, the pipeline applies all rules for field mapping, synonym replacement, and unit conversion.

Ongoing monitoring helps catch new source variations. A source may add a field or change a value. The pipeline should log unmapped fields and unrecognized values for review.

  • Extract data from each source
  • Apply schema mapping rules
  • Normalize values and units
  • Load into the target schema
  • Log unrecognized values for review

Common Questions on Data Normalization and Mapping

What is the difference between data normalization and schema mapping?

Data normalization changes values to a standard format. Schema mapping defines how fields from sources correspond to fields in the target schema. Both are needed to create one consistent schema from multiple sources.

How do you handle different names for the same attribute?

Schema mapping matches source fields to target fields based on meaning. A source field called 'color' can map to a target field called 'colour'. The mapping is documented in a crosswalk.

Why is a controlled vocabulary important for data integration?

A controlled vocabulary restricts values to a set of allowed terms. It prevents variations like 'apt' and 'apartment' from appearing as different values. Synonym mapping then converts source values to these preferred terms.

Can normalization be fully automated?

Normalization can be automated for known transformations such as unit conversions and date formatting. New variations may require manual review and rule updates. An ETL pipeline can apply rules automatically once defined.

What are common challenges in normalizing data from multiple sources?

Challenges include inconsistent field names, missing values, and different formats for dates and numbers. Synonyms and units vary across sources. Deduplication after normalization adds complexity when sources overlap.

How does deduplication work after normalization?

Deduplication compares records on key fields after normalization. Matching rules flag records that are likely the same entity. The system can merge duplicates or keep one record based on rules.

Read next

Latest articles