This lesson on Connecting to Data & Joins is hands-on and example-driven. You will combine multiple relational tables in Tableau using physical-layer joins instead of logical-layer relationships. You will master configuring Inner, Left, Right, and Full Outer join types, and write custom join calculations to merge tables lacking identical join keys.
What You'll Be Able To Do
- Navigate between the logical layer and physical layer of Tableau's data model.
- Configure Inner, Left, Right, and Full Outer joins using common key fields.
- Interpret Venn diagram visual cues to predict row inclusion and null generation.
- Write custom join calculations to concatenate or transform fields for table matching.
Detailed Concept Walkthrough
1. Navigating the Physical Layer
Tableau's data model consists of two distinct tiers: the top logical layer (relationships/noodles) and the underlying physical layer (joins/unions). Joins occur strictly within the physical layer.
- Mechanism: Double-clicking any logical table opens its physical container canvas, marked by an orange border and a dedicated close button in the canvas header.
- Under the Hood: While logical relationships preserve separate levels of detail dynamically per visualization, entering the physical layer forces a fixed row-level merge before data reaches the worksheet.
- Best Practice: Use the physical layer only when you explicitly need a fixed, pre-aggregated, or merged tabular schema across specific tables.
// Navigation Action in Tableau UI:
// 1. Double-click [Book] table in logical canvas.
// 2. Drag [Award] table into the opened container.
// 3. Click the Join icon to edit join conditions.
Key Takeaway: Double-click a logical table to access the physical layer where traditional Venn-diagram joins are configured.
2. Join Types and Venn Diagrams
Join types determine which rows are retained when combining tables on matching join keys, visualised in Tableau via shaded Venn diagram icons.
- Mechanism: Click the join icon between two physical tables to select Inner, Left, Right, or Full Outer join clauses based on field equality.
- Execution Flow: An Inner join returns only intersecting rows; Left join retains all left-table rows with matching right-table data; Right join retains all right-table rows; Full Outer combines all rows from both sides, producing nulls where keys do not match.
- Nuance: Hovering over the Venn diagram icons provides live visual warnings indicating where null values will be introduced across non-matching records.
-- Equivalent SQL executed under the hood for a Left Join:
SELECT *
FROM Book
LEFT JOIN Award
ON Book.Title = Award.Title;
Key Takeaway: Select join types by referencing the shaded areas of Tableau's Venn diagram interface to control row retention and null insertion.
3. Join Calculations for Mismatched Keys
When two tables lack an identical key field, join calculations dynamically transform or concatenate fields on the fly to establish a match.
- Mechanism: Select 'Create Join Calculation' from the field drop-down inside the join configuration dialogue to open the formula editor.
- Syntax Rule: Write standard Tableau expressions to align formats, such as concatenating string split fields to match a composite primary key.
- Best Practice: Inspect source data closely to detect composite keys before joining, avoiding dropped rows caused by mismatched field schemas.
// Custom Join Calculation inside Tableau Join Dialog
// Left Table Key: [Book ID]
// Right Table Join Clause Expression:
[Book ID1] + [Book ID2]
Key Takeaway: Use custom join calculations to construct composite keys or transform data types directly inside the join configuration dialogue.
Topics Covered in Connecting to Data & Joins
- Introduction & Physical Layer (0:00 - 0:45) — The instructor introduces data joins and demonstrates how to enter the physical layer by double-clicking a logical table.
- Joining Tables on Common Fields (0:46 - 1:35) — The Award table is dragged into the physical canvas and joined to Book using Title as the common key.
- Join Types & Venn Diagrams (1:36 - 2:14) — The instructor explains Inner, Left, Right, and Full Outer joins using Tableau's Venn diagram interface.
- Custom Join Calculations (2:15 - 3:05) — A join calculation concatenates Book ID1 and Book ID2 to match the Book table's composite primary key.
- Closing the Physical Layer (3:06 - 3:34) — The physical layer is closed to verify the resulting joined table in the logical data model.
Reference Cheat Sheet
-
Double-Click Logical Table— Opens physical layer container for joins and unions -
Inner Join— Retains only records with matching keys in both tablesBook.Title = Award.Title -
Left Join— Retains all left records and matching right recordsBook.Title = Award.Title -
Right Join— Retains all right records and matching left recordsBook.Title = Award.Title -
Full Outer Join— Retains all records from both tables, filling mismatches with nullsBook.Title = Award.Title -
Create Join Calculation...— Builds an ad-hoc calculation to match join keys[Book ID1] + [Book ID2]
Comparison Table
| Join Type | Retained Left Rows | Retained Right Rows |
|---|---|---|
| Inner | Only matching rows | Only matching rows |
| Left | All rows | Only matching rows |
| Right | Only matching rows | All rows |
| Full Outer | All rows | All rows |
Common Pitfalls
- Mistake: Trying to configure traditional joins on the top canvas. Avoid: Double-click the table icon to drill into the physical layer first.
- Mistake: Assuming join keys must always match single existing columns. Avoid: Use join calculations to concatenate or manipulate split keys.
- Mistake: Choosing Full Outer join without accounting for missing data. Avoid: Inspect the preview pane to handle resulting null attributes appropriately.
FAQs
- How do I know whether I am in the logical layer or the physical layer? The logical layer displays flexible relationship noodles between table icons, while the physical layer shows an enclosed border with classic Venn-diagram join symbols.
- What happens when a Left Join finds no match in the right table? Tableau retains the left table row and inserts Null values for all incoming right table columns.
- Can I join tables on multiple fields or calculated fields? Yes, you can add multiple join clauses and write custom join calculations directly in the join configuration window.