liveBook · Manning

Left outer join

As explained in Grokking AI Applications

A join that retains every row from the left table and adds matching rows from the right table when available.

A left outer join combines two tables while keeping every row from the left table. Matching data from the right table is added when it exists; otherwise, the right-side columns contain missing values. Use it when the left table defines the complete audience you must retain. section 7.2

Keep every customer for email generation

Join Customer Master Data to Transaction History by CustomerID. Customers with no purchases still appear and can receive an email. A customer with two transactions appears twice, once for each matching transaction. A transaction-only customer is excluded because it has no matching master-data row. section 7.2

Choose the join type by deciding which records the final result must keep:

  • Use a left outer join to preserve all left-table customers, including those without transactions. section 7.2
  • Use an inner join when only rows matched in both tables should remain. section 7.2
  • Use a right outer join to retain right-table-only records, such as records useful for audits. section 7.2

CustomerID

FirstName

Age

City

ProductName

PurchaseDate

Amount

CUST001

Rebecca

53

Manchester

?

?

?

CUST002

Maicol

41

Milan

Sleep Lamp

2025-01-25

439.96

CUST002

Maicol

41

Milan

Essential Oil Diffuser

2025-03-10

288.00

CUST003

Giulia

37

Milan

?

?

?

Inspect the combined output: missing transaction fields mark customers without purchases, while repeated customer rows represent multiple matching transactions. section 7.2

How Grokking AI Applications covers it

How deep it goes
Explains preservation, missing values, duplicate matches, and contrasts with inner and right outer joins.
Examples
Uses customers with no purchases, one customer with two purchases, and a transaction-only customer record.
What you can do after
Operate/configure it with the KNIME Joiner node to preserve all rows from the left input table.
How it connects
Connects Customer Master Data, Transaction History, inner joins, right outer joins, and the KNIME Joiner node.

Also explained in

Compare how 6 books explain left outer join →

Related concepts

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