AAmit’s LibraryLEARN · PRACTISE · REFLECT

Strategy and innovation × Data engineering

Business lens: Strategy and innovation · Technology lens: Data engineering

Reading scope: Original synthetic, subject-specific teaching. References support selected background, not the invented businesses or calculations.

The innovation question sets the data boundary

A distributor is considering a reorder portal for small shops. Management asks whether it would reduce stockouts, but its analyst initially receives only invoiced sales. Invoiced sales omit refused requests, cancelled orders and customers who could not find an item. Data engineering must begin with the intended decision and these missing observations. Define the pilot population, time window and unit of analysis before choosing a pipeline. A technically polished warehouse built around the wrong boundary can make strategy less informed. Treat availability, request, reservation, dispatch and invoice as distinct events. Their relationship explains where the proposed portal could change a customer outcome.

Grain, identities and time

An order header is not an order line, and a stock snapshot is not an item request. Specify each record’s grain and use stable order and product identifiers to join appropriate records. Preserve event time separately from ingestion time so late records can be interpreted correctly. Map product codes deliberately; the same label in two systems may describe different pack sizes. Record units and definitions beside the data rather than relying on a developer’s memory. A constraint can reject a missing key or invalid relationship, but cannot determine whether staff selected the right product. Build a review route for ambiguous mappings and authorised corrections.

A duplicate that changes the strategic story

The synthetic request feed contains 120 rows, including 20 repeated copies of already recorded requests. There are therefore 100 distinct requests under the stipulated identity rule. Eighty were fulfilled. Dividing 80 by 120 gives 66.67%, whereas 80 divided by 100 gives 80%. The difference is not a change in service; it is a change in the denominator. Do not remove records merely because their values look similar: two genuine requests may have the same product and quantity. Use an established request identity and inspect conflicts. Keep original rows, deduplication rules and reconciliation counts so a reviewer can reconstruct the corrected measure.

Pipeline controls and departmental ownership

Sales records an unfulfilled request without disguising it as an invoice. Operations supplies stock and fulfilment events. Finance reconciles invoiced quantities and adjustments. Data engineers implement the agreed transformations and make failed validations visible. The business owner decides whether incomplete data permits the pilot decision to proceed. Define counts entering and leaving each step, rejected records and unresolved mapping cases. A quiet pipeline is not necessarily a healthy pipeline; it may silently discard difficult observations. Publish an evidence-quality note with the dashboard so missing events are visible to management instead of presenting a neat percentage without its construction history.

Late events, backfills and correction

Suppose ten fulfilment events arrive after the weekly review. Preserve the original snapshot and issue a revised measure with the reason and affected period. A backfill should not quietly make a historical decision appear to have used information unavailable at the time. Test replay with stable identities so processing the same batch does not create additional requests. Keep access proportionate because customer records may be linked across systems. When a mapping is wrong, correct the transformation and examine dependent reports. The aim is dependable evidence under stated conditions, not a guarantee that every recorded fact is accurate or that better records automatically justify launching the portal.

Enquiry and deeper study

Who owns the definition of a fulfilled request? Whom is the sales-only feed excluding? Whose identifiers connect shop requests to dispatches? What is the grain of each table? Where do rejected events go? When is a weekly snapshot considered closed? Why is ingestion time different from event time? Which duplicates are genuine repeats? How can a reviewer reproduce the denominator? Foundation learners explain missing observations. Undergraduate learners draw the entities and reconciliation table. Postgraduate learners compare snapshot and event-based reporting and evaluate correction costs. Research learners propose a study of whether recorded lost demand changes product decisions, while considering reporting behaviour and shop selection. Submit a lineage map and a before-and-after reconciliation.

Study questions and answers

Correct the fulfilment rate after removing stipulated repeated identities.

100 distinct requests remain; 80/100 = 80%. The raw-row ratio is 80/120 = 66.67% and answers a different, distorted question.

Marking guide: Credit 80/100 = 80% after identity-based deduplication and 80/120 ≈ 66.67% as the raw-row measure. Explain how grain changes the question answered.

Why not remove every identical product/quantity row?

Genuine separate requests can have equal values. Use request identity and inspect conflicts rather than assuming equal values mean duplication.

Marking guide: Credit equal product/quantity values being possible in genuine separate requests. Require stable request identity and inspection of conflicts instead of value-only deletion.

What should a late correction preserve?

The original snapshot, revised result, reason and affected period, so later evidence is not misrepresented as available at the decision time.

Marking guide: Credit original and corrected snapshots, affected period and reason. Explain why later evidence must not be represented as known at the original decision time.

Practice task

Submit record grains, identity rules, an event-time/ingestion-time example, a reconciliation table and a correction policy.

Sources and further reading

  • PostgreSQL documentation — Constraints
    Scope: Selected public documentation checked for record constraints. Constraint validity does not establish factual correctness; no external database instance was operated.
    Access: Public reading available in this check. No account required to read the selected material; events, certificates and execution services not implied.

Related chapters

Interactive practice

Open workshop

Open interactive matrix reading