Big Data & Data-Driven Strategy

Chapter 4
Data Engineering, Integration and Quality

Advance Diploma in Business Analytics
Big Data & Data-Driven Strategy   •   Advance Diploma

Data Engineering, Integration and Quality

Introduction

Modern analytics depends less on the existence of data than on the reliability, accessibility and meaning of that data. Organisations collect transactions, customer interactions, sensor readings, documents, clickstreams and data from external partners. These sources differ in structure, update frequency, ownership, quality and legal status. Data engineering converts this heterogeneous raw material into information that analysts, managers and machine-learning systems can use with confidence.

Data engineering includes the design of ingestion mechanisms, storage platforms, transformation pipelines, integration models, metadata services, master-data practices and quality controls. It is therefore both a technical discipline and a governance activity. A dashboard may be visually impressive, but if its customer identifiers are duplicated, its sales data is delayed, or its definitions are inconsistent with finance, the resulting decisions may be incorrect.

This chapter examines how organisations build analytics-ready information through ETL and ELT, APIs and other ingestion methods, cleansing and transformation, master data management, metadata, lineage and formal data-quality controls.

Learning objectives

By the end of this chapter, you should be able to:

  • distinguish data ingestion, integration, ETL and ELT;
  • select suitable ingestion methods for batch, streaming and external data;
  • design practical cleansing and transformation rules;
  • explain the roles of master data, reference data, metadata and lineage;
  • define and measure data-quality dimensions;
  • apply validation, monitoring and reconciliation controls;
  • evaluate governance, security, ethical and regulatory implications; and
  • propose an analytics-ready data architecture for a business problem.

1. The data-engineering pipeline

A data pipeline is a managed sequence through which data moves from one or more sources to a destination where it can be queried or used operationally. A simplified pipeline contains the following stages:

  1. Source systems: enterprise-resource-planning systems, customer-relationship-management systems, websites, mobile applications, files, sensors and external services.
  2. Ingestion: acquiring data through connectors, files, event streams or APIs.
  3. Landing and storage: preserving received data, often in a raw or immutable zone.
  4. Profiling and validation: examining structure, completeness, validity, duplication and unusual patterns.
  5. Transformation and integration: standardising, joining, enriching and aggregating data.
  6. Curated storage: publishing trusted tables, semantic models or data products.
  7. Consumption: supporting reporting, analytics, operational applications and machine learning.
  8. Monitoring and governance: recording quality, lineage, access, failures and changes throughout the pipeline.

A useful design principle is to separate the system of record from analytical copies. A source application remains responsible for its operational transactions, while an analytical platform provides a controlled representation for analysis. This prevents reporting workloads from damaging transactional performance and allows historical snapshots to be retained.

Batch, micro-batch and streaming

Batch processing collects data and processes it at scheduled intervals. It is appropriate for daily finance reporting, periodic supplier files and workloads where latency of several hours is acceptable. Micro-batching processes small groups at short intervals. Streaming processes events continuously or near-continuously, which is useful for fraud alerts, industrial monitoring and real-time recommendations.

The appropriate choice depends on business latency, cost, source capability, event volume, ordering requirements and tolerance for late-arriving data. “Real time” should be defined operationally—for example, a maximum end-to-end delay of 30 seconds—rather than used as an imprecise marketing term.

2. ETL and ELT architectures

ETL means extract, transform and load. Data is extracted from a source, transformed in an intermediate processing environment, and then loaded into a target such as a data warehouse. ETL is useful when the target requires strict schemas, when sensitive data must be reduced before loading, or when transformation tools are established outside the warehouse.

ELT means extract, load and transform. Data is loaded, often in relatively raw form, into a scalable analytical platform and transformed there. ELT supports reprocessing, exploration and multiple downstream uses because the original input is retained. It requires effective storage controls, access restrictions, compute management and discipline around raw-data interpretation.

AspectETLELT
Transformation locationBefore target loadingWithin target platform
Raw-data retentionOften limited unless designed explicitlyCommonly retained
Main strengthControlled, pre-validated loadingFlexible, scalable reprocessing
Main riskLong transformation bottlenecksRaw-data sprawl and uncontrolled definitions
Typical useStructured warehouse with strict gatesCloud lakehouse or scalable warehouse

Neither pattern is universally superior. A hybrid architecture may mask personal identifiers before loading, retain encrypted raw data, and perform business transformations in a warehouse. The choice should reflect security, cost, latency, governance and analytical requirements.

Idempotence and incremental processing

A reliable pipeline should be idempotent where possible: rerunning the same input should not create unintended duplicates or change a correct result. This may be achieved through stable event identifiers, deduplication keys, merge operations and controlled partitions.

Incremental loading reduces cost by processing only new or changed records. A common approach uses a reliable change marker such as an update timestamp or source-system change-data-capture log. Timestamps alone can be unsafe when clocks differ, records arrive late, or updates occur with identical timestamps. High-value pipelines combine watermarks, overlap windows and reconciliation.

For a source containing records with an update time, an incremental extraction may select records satisfying:

lastsuccessfulwatermark < updatetime ≤ currentwatermark

The two watermarks must use the same time zone and timestamp convention. An overlap window may intentionally re-read a small earlier interval; idempotent loading then prevents duplicates while capturing late updates.

3. Data ingestion and APIs

Ingestion is the controlled acquisition of data. Common approaches include:

  • Database connectors: query or replicate relational and NoSQL sources.
  • File ingestion: receive CSV, JSON, XML, Parquet or spreadsheet files through managed transfer locations.
  • Message and event systems: publish events to topics or queues for asynchronous processing.
  • API ingestion: request data from an application using defined endpoints and protocols.
  • Change-data capture: capture inserts, updates and deletes from database logs.
  • Device and sensor ingestion: receive time-stamped measurements, often through gateways.

An API contract should specify endpoint, authentication, request parameters, response schema, pagination, rate limits, error codes, versioning and retention. A pipeline should not assume that an API returns every record in one response. It should handle pagination, retries, timeouts and partial failures.

A safe retry strategy distinguishes transient failures, such as temporary unavailability, from permanent failures, such as invalid credentials. Exponential backoff reduces pressure on a recovering service. A dead-letter queue or quarantine area should retain messages that cannot be processed, together with a reason and processing attempt history.

Security controls include encrypted transport, secret management, least-privilege credentials, network restrictions and removal or masking of unnecessary personal data. API terms of use, data-residency rules and consent conditions must also be considered.

4. Data modelling and integration

Integration creates a coherent view from sources that were not designed to work together. The most common difficulties are different identifiers, naming conventions, granularities, time zones, units and definitions.

A grain statement identifies what one row represents. For example, “one row per order line” is different from “one row per order.” Joining two tables without understanding grain can multiply amounts and produce false totals. Before joining, ask:

  • What does one row represent in each table?
  • Is the relationship one-to-one, one-to-many or many-to-many?
  • Which key identifies the entity?
  • Are records current, historical or event-based?
  • Are measures additive across the intended dimensions?

A star schema commonly contains a central fact table and surrounding dimension tables. A sales fact may contain quantity, gross amount and discount, linked to customer, product, store and date dimensions. Dimensions provide descriptive context; facts record events or measurements. Slowly changing dimensions preserve changes in descriptive attributes. In a type 1 approach, the old value is overwritten. In a type 2 approach, a new version is created with effective dates, allowing historical analysis.

Conformed dimensions use consistent definitions across subject areas. If “customer,” “month” and “net sales” mean different things in marketing and finance, cross-functional analysis becomes unreliable even when the database joins correctly.

5. Cleansing and transformation

Data cleansing improves fitness for use; it does not mean making data artificially perfect. Rules should be based on business meaning and documented assumptions.

Important activities include:

  • standardising formats, such as dates, country codes and currency codes;
  • validating domains, such as permitted status values;
  • handling missing values through preservation, imputation, exclusion or explicit “unknown” categories;
  • identifying duplicates using deterministic keys or probabilistic matching;
  • correcting units and time zones;
  • parsing names and addresses cautiously;
  • validating referential integrity;
  • detecting outliers without automatically deleting legitimate exceptional cases; and
  • recording every material correction and rejected record.

A transformation should be deterministic where possible. For example, a currency conversion requires a stated exchange-rate source, rate date, base currency and treatment of missing rates. A revenue transformation should specify whether tax, refunds, shipping and discounts are included.

Missing values

Missingness may be accidental, systematic or meaningful. A blank phone number may mean “not supplied,” while a blank cancellation date may mean “the order has not been cancelled.” Replacing both with zero would destroy meaning. The pipeline should distinguish null, blank, zero, not applicable and unknown when those states have different interpretations.

Entity resolution

Entity resolution links records that refer to the same real-world entity. A customer may appear with different spellings, addresses or identifiers. Deterministic matching uses exact trusted keys. Probabilistic matching uses several features and a threshold, but it can produce false matches and must support review, explainability and correction. High-impact decisions should not rely on opaque matching alone.

6. Master data management and reference data

Master data describes core business entities shared across processes, such as customers, products, suppliers, employees and locations. Reference data consists of controlled values used to classify or interpret information, such as country codes, product categories, currencies and order statuses.

Master data management (MDM) establishes policies, ownership, identifiers, matching rules, survivorship rules and distribution mechanisms for these entities. A common MDM lifecycle is:

  1. identify source records;
  2. profile and standardise attributes;
  3. match records to detect possible duplicates;
  4. create or update a mastered entity;
  5. select trusted attribute values using survivorship rules;
  6. assign a persistent identifier; and
  7. distribute the mastered record to approved systems.

A survivorship rule might state that a verified legal name comes from the compliance system, while a current delivery address comes from a validated customer-service process. Such rules should be explicit and auditable rather than hidden in code.

MDM is not simply a software installation. It requires data owners, stewardship responsibilities, change procedures and agreement about definitions. Excessive centralisation can slow operations; insufficient coordination leaves conflicting records unresolved.

7. Metadata and data lineage

Metadata is data about data. Technical metadata includes table names, column types, partitions and schemas. Business metadata defines terms such as “active customer” or “net revenue.” Operational metadata records load times, row counts, failures and processing durations. Governance metadata identifies owners, sensitivity classifications, retention periods and access rules.

A data catalogue makes metadata searchable and helps users discover trusted assets. A glossary links business terms to approved definitions. Metadata should be treated as a maintained product: stale catalogues create false confidence.

Data lineage records where data came from, how it changed and where it is used. Lineage may be:

  • source-to-target, showing movement between systems;
  • column-level, showing how a particular field was derived; or
  • impact lineage, showing which reports or models may be affected by a source change.

Lineage supports root-cause analysis, audit, privacy requests, migration planning and change impact assessment. For example, if a source application changes its customer-status code, lineage can identify affected transformations, dashboards and models.

8. Data-quality dimensions and controls

Quality is fitness for a defined purpose, not an abstract claim that data is universally good. Common dimensions are:

DimensionQuestionExample control
AccuracyDoes the value represent reality?Compare shipment weight with a verified scale
CompletenessAre required values present?Percentage of orders with a customer identifier
ValidityDoes the value conform to rules?Date falls within an allowable range
ConsistencyDoes it agree across sources?Product category agrees with the master record
UniquenessAre unintended duplicates absent?One active account per approved identifier
TimelinessIs it available within the required period?Load completed by 06:00 daily
IntegrityAre relationships preserved?Every fact row has a valid product key

For a set of records, a simple completeness rate for a required attribute is:

Completeness rate = (number of non-null required values ÷ total records) × 100%

The formula assumes that null status is correctly identified and that every record in the denominator belongs to the measured population. If 9,700 of 10,000 customer records contain a required email value, completeness is 97%. This does not establish accuracy, validity or consent.

Controls should operate at several points:

  • preventive controls: schema contracts, permitted-value rules and access restrictions;
  • detective controls: profiling, anomaly detection, duplicate checks and reconciliations;
  • corrective controls: quarantine, reprocessing, stewardship review and source-system remediation.

A quality score should not conceal failures by averaging dimensions. A dataset with 99% completeness but invalid financial amounts may still be unusable. Thresholds should reflect business risk: a small error rate in a regulatory report may be unacceptable, while a recommendation dataset may tolerate some missing attributes.

Reconciliation and observability

Reconciliation compares source and target populations or totals. Useful checks include record counts, control totals, distinct-key counts, minimum and maximum dates, and sums of financially meaningful measures. Differences should be explained by documented filters, timing, refunds, rejected records or late arrivals.

Pipeline observability includes freshness, volume, schema changes, distribution shifts, error rates and processing latency. Alerts should be actionable and linked to runbooks. Monitoring only whether a job completed is insufficient: a successful job can still load zero rows or corrupt values.

9. Applied case: integrating retail order data

This is an illustrative case. A regional retailer wants a daily profitability dashboard combining its e-commerce platform, store point-of-sale system, product master and external currency rates.

Background and problem

The e-commerce system identifies customers by email, stores timestamps in UTC and records discounts at order level. Stores use a loyalty number, local time and line-level discounts. Product categories differ between systems. Finance reports net sales after refunds and tax adjustments, but the initial dashboard counted gross order values. Managers therefore received inconsistent regional and product results.

Analysis

The team first wrote grain statements: e-commerce and store facts would contain one row per order line; refunds would be separate events linked to the original line where possible. A data profile found duplicate customer emails, missing product identifiers, invalid currency codes and late refund records. Interviews established that finance’s definition of net sales excluded sales tax and included approved refunds.

Approach and solution

The retailer designed a hybrid pipeline. Source data was loaded daily into a restricted raw zone. Sensitive customer attributes were masked for general analysts. Incremental extraction used source update timestamps with a two-hour overlap; merge logic and stable source keys prevented duplication.

Product and store records were matched to mastered identifiers. A type 2 product-category dimension preserved historical categories. Time-zone conversion used the store’s registered location rather than the server location. Currency conversion used the transaction date and a documented rate source. Invalid records were quarantined with error codes rather than silently discarded.

The curated fact table contained quantity, gross sales, discount, tax, refund and net-sales measures. Automated tests checked referential integrity, permitted currencies, non-negative quantities except for explicitly coded returns, duplicate line keys and reconciliation to finance control totals.

Outcome

The dashboard became reproducible: users could trace net sales to source transactions, identify delayed refunds and distinguish current from historical product categories. Remaining exceptions were visible in a stewardship queue rather than hidden. The organisation also reduced disputes because “net sales,” customer identity and product classification had documented owners and definitions.

Learning points

The central lesson is that integration is not merely a joining exercise. Grain, definitions, identifiers, time, quality thresholds, lineage and ownership must be designed together. A technically successful pipeline can still produce strategically misleading information if business semantics are unresolved.

10. Governance, ethics and contemporary practice

Data engineering can create privacy and fairness risks. Collecting more data than necessary increases exposure and may violate purpose limitations. Personal data should be classified, minimised, encrypted where appropriate, retained only as long as justified and made accessible only to authorised roles. De-identification is not automatically irreversible; combinations of quasi-identifiers may permit re-identification.

Data-quality controls should also examine representational bias. If a customer master systematically fails to match names from a particular language group, downstream segmentation may disadvantage that group. Human review, documented matching logic and performance monitoring are important in high-impact applications.

Regulatory obligations vary by jurisdiction but commonly include lawful processing, access and correction rights, retention controls, breach response, auditability and restrictions on automated decisions. Legal review should occur before a pipeline is deployed, not after an incident.

Contemporary platforms increasingly combine data lakes, warehouses and governance features in lakehouse-style architectures. Data contracts specify expected schemas, semantics, quality obligations and ownership between producers and consumers. Data products package datasets with documentation, service expectations and support responsibilities. Artificial intelligence can assist anomaly detection, schema mapping and metadata generation, but generated transformations require testing, provenance and human accountability. AI does not remove the need for authoritative definitions or quality ownership.

Best-practice design checklist

A professional data-engineering initiative should:

  1. begin with business questions, required grain and service-level expectations;
  2. document source ownership, definitions, sensitivity and retention;
  3. preserve raw inputs where lawful and useful, while controlling access;
  4. use stable identifiers and idempotent processing;
  5. design for late, duplicated, missing and out-of-order data;
  6. separate quarantined records from silently discarded records;
  7. publish business and technical metadata with lineage;
  8. automate quality tests and reconcile important totals;
  9. version schemas, transformations and reference data;
  10. assign accountable owners and stewards; and
  11. review cost, security, privacy and ethical impact continuously.

Chapter Summary

Data engineering transforms diverse operational and external data into reliable analytical information. Ingestion may be batch, micro-batch or streaming and may use files, connectors, events, APIs or change-data capture. ETL transforms before loading, whereas ELT loads first and transforms in the analytical platform; hybrid designs are often practical. Reliable pipelines require incremental processing, idempotence, error handling and observability.

Integration depends on grain, keys, time zones, units, conformed dimensions and agreed business definitions. Cleansing addresses formats, missingness, duplicates, validity and referential integrity, but every correction should be documented. Master data management establishes trusted identities for shared entities, while reference data controls classification values. Metadata explains structure, meaning, ownership and operations; lineage explains origin, transformation and use.

Quality must be measured through dimensions such as accuracy, completeness, validity, consistency, uniqueness, timeliness and integrity. Preventive, detective and corrective controls work together. Governance must address privacy, security, retention, fairness and accountability. Ultimately, analytics-ready data is not simply data that has been moved: it is data whose meaning, quality, provenance and limitations are understood.

Key Terms

API: A defined interface through which software requests or exchanges data.

Batch processing: Processing data in accumulated groups at scheduled times.

Change-data capture: Recording source-system inserts, updates and deletes.

Data contract: An agreed specification of schema, meaning, quality and ownership between data producers and consumers.

Data lineage: A record of data origin, transformation and downstream use.

Data quality: Fitness of data for a defined business or analytical purpose.

ELT: Extract, load and transform; transformation occurs after loading into the target platform.

ETL: Extract, transform and load; transformation occurs before loading into the target.

Entity resolution: Linking records that represent the same real-world entity.

Grain: The business meaning represented by one row in a dataset.

Idempotence: The property that repeated processing of the same input does not create unintended additional effects.

Ingestion: The controlled acquisition of data into a processing or storage environment.

Master data: Shared core entities such as customers, products and suppliers.

Metadata: Data describing data, including structure, meaning, ownership and operation.

Reference data: Controlled classification values such as currencies, countries and statuses.

Reconciliation: Comparison of source and target counts, totals or populations to identify unexplained differences.

Schema: The structure, types, relationships and constraints of a dataset.

Slowly changing dimension: A dimension design that manages changes in descriptive attributes over time.

Stewardship: Operational responsibility for maintaining data definitions, quality and issue resolution.

Quarantine: Isolating records that fail processing or quality rules for investigation.

Review Questions

Short Answer Questions

  1. What is the principal difference between ETL and ELT?
  2. Why is a grain statement important before joining datasets?
  3. Distinguish master data from reference data.
  4. Name four dimensions of data quality.
  5. What purposes does data lineage serve?

Long Answer Questions

  1. Explain how a reliable batch pipeline should handle incremental extraction, late-arriving records and duplicate inputs.
  2. Compare batch, micro-batch and streaming ingestion, including suitable business applications for each.
  3. Describe an MDM lifecycle from source profiling to distribution of mastered records.
  4. Explain how metadata, catalogues and lineage improve analytical governance.
  5. Discuss the ethical, privacy and security risks associated with integrating personal data.

Analytical / Application Questions

  1. A company joins an order table containing one row per order to a discount table containing one row per order line. Explain how the resulting revenue may be distorted and propose a corrective design.
  2. A daily pipeline completes successfully but the dashboard shows a 40% fall in sales. Design a sequence of quality, reconciliation and lineage checks to locate the problem.
  3. Design an ingestion and quality-control approach for combining a mobile-app API, store transactions and a product master for near-daily customer analysis. Justify your choices of ingestion pattern, identifiers, transformations and governance controls.

Multiple Choice Questions with Answers

Question 1

Which statement best describes ELT?

A. Data is transformed before it is extracted from the source

B. Data is extracted, loaded into the target platform, and transformed there

C. Data is extracted only after all reports are generated

D. Data is transformed exclusively within operational applications

Correct Answer: B. Data is extracted, loaded into the target platform, and transformed there

Question 2

What is the main purpose of a grain statement?

A. To specify the colour scheme of a dashboard

B. To identify the encryption algorithm used by a database

C. To state what one row in a dataset represents

D. To calculate the storage cost of a pipeline

Correct Answer: C. To state what one row in a dataset represents

Question 3

Which control is primarily preventive?

A. Quarantining a rejected record after loading

B. Reviewing an incident after a failed pipeline

C. Applying a schema contract before data is accepted

D. Comparing source and target totals after processing

Correct Answer: C. Applying a schema contract before data is accepted

Question 4

Which item is an example of reference data?

A. A customer’s complete order history

B. A controlled list of currency codes

C. A raw clickstream event

D. A supplier invoice image

Correct Answer: B. A controlled list of currency codes

Question 5

If 9,700 of 10,000 records contain a required value, what is the completeness rate?

A. 9.7%

B. 30%

C. 97%

D. 103%

Correct Answer: C. 97%

Question 6

What is the principal benefit of type 2 slowly changing dimensions?

A. They eliminate the need for primary keys

B. They preserve historical versions of descriptive attributes

C. They guarantee that all source records are accurate

D. They convert batch processing into streaming

Correct Answer: B. They preserve historical versions of descriptive attributes

Question 7

Which practice most directly supports safe retries of a pipeline?

A. Removing all source identifiers

B. Using stable keys and idempotent merge logic

C. Ignoring records received more than once

D. Overwriting all historical partitions without controls

Correct Answer: B. Using stable keys and idempotent merge logic

Question 8

Which metadata type records table structures, column types and partitions?

A. Technical metadata

B. Marketing metadata

C. Sentiment metadata

D. Decorative metadata

Correct Answer: A. Technical metadata

Question 9

A pipeline loads zero rows but reports successful completion. Which capability is most likely to detect this problem?

A. Dashboard colour standardisation

B. Pipeline observability and volume monitoring

C. Replacing all nulls with zero

D. Deleting the raw data zone

Correct Answer: B. Pipeline observability and volume monitoring

Question 10

What is the primary purpose of master data management?

A. To create trusted, shared identities and attributes for core entities

B. To remove all historical records from analytical systems

C. To prevent analysts from using reference data

D. To guarantee that every API responds instantly

Correct Answer: A. To create trusted, shared identities and attributes for core entities

Big Data & Data-Driven Strategy
Chapter 4 of 15