liveBook · Manning

Normalized table

As explained in Learn AI Data Engineering

A normalized table is a flat tabular representation in which nested records are expanded into rows with their relevant fields as columns.

A normalized table converts nested order data into a flat tabular structure: each product becomes a row, while shared fields such as order_id and status repeat across its products. section 2.2.1

A practical normalization pipeline can:

  • Exclude canceled orders before expanding product arrays. section 2.2.1
  • Extract product_name, brand, and color from descriptions with regular expressions. section 2.2.1
  • Compute price_with_tax using 20% for completed orders and 10% for pending orders. section 2.2.1

Order products as rows

An order containing Nike Air Max and Adidas Ultraboost produces two rows with repeated order_id and status values. A pending Puma Speedcat produces one row; the canceled Reebok order produces none. section 2.2.1

Table 2.1 Example DataFrame
order_id
status
product_name
brand
color
price
quantity
price_with_tax
1
completed
Air Max
Nike
Red
120
1
144
1
completed
Ultraboost
Adidas
Black
150
2
180
2
pending
Speedcat
Puma
White
90
3
99

Inspect the resulting DataFrame schema and computed values for the normalized product rows. section 2.2.1

How Learn AI Data Engineering covers it

How deep it goes
Explains row expansion, field extraction, filtering, and tax computation while flagging regex inconsistency and scaling challenges.
Examples
Uses nested orders containing product descriptions, statuses, prices, quantities, and a resulting product-level DataFrame.
What it assumes
Assumes familiarity with nested JSON and basic pandas, while demonstrating how shared and product-specific fields become columns.
What you can do after
Apply it via pandas by expanding products, extracting fields, filtering statuses, and calculating adjusted prices.
How it connects
Connects nested JSON with pandas, SQL, regular expressions, DataFrames, and data transformation.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Learn AI Data Engineering. The section links point to the parts of the book it draws on.