A relationship links a field of one Lake table to a field of another on the relationship diagram. Create it by dragging between fields or in the Create Relationship dialog, change its cardinality at any time, and remove it when the link no longer applies. Custom arrangements of the canvas are covered in Diagram layouts.
Releasing starts the save. A new line appears on the canvas straight away and is replaced by the saved one when the save completes. The diagram then shows "Relationship created" with "Table reference and relationship created successfully".
Cardinality says how many rows of each table a relationship matches.
| Cardinality | Shown as | What it means |
|---|---|---|
| One to One | 1:1 | One row of the primary table matches one row of the referenced table. |
| One to Many | 1:* | One row of the primary table matches many rows of the referenced table. |
| Many to One | *:1 | Many rows of the primary table match one row of the referenced table. |
The change is saved when you confirm. If it fails, the diagram shows "Failed to update relationship" with the reason.
The line leaves the canvas and the diagram shows "Relationship Removed". If the removal fails, it shows "Reference remove failed" with the reason.
Removing a relationship removes the link between the two fields only: the tables and their data stay as they are.
Creating, changing and removing a relationship needs Add/Modify Lake Objects. When the server refuses a change, the diagram shows the failure message with the reason. For the full permission model, see Who can do what in the Lake.
Create stays unavailable until all four choices are made (the two tables and their fields) and the two fields have the same type. If the types differ, the dialog shows "Relationships can only be created between fields of the same type". Choose two fields of one type to continue.
On the Lake diagram, a dragged link must join two different tables, so a drag inside one table is ignored. The Warehouse diagram allows a field to reference another field of the same table; see Relationship diagram.
No. The offered cardinalities are One to One, One to Many and Many to One. To model a many-to-many link, add a third table (a junction table) between the two tables and link both of them to it.
Yes. Click the line, click Edit relationship (or double-click the line), choose the new cardinality in Set Relationship Type and click Confirm. The dialog opens on the relationship's current cardinality.
Click the line to select it, click Delete relationship, then click Remove in Remove Relationship. The diagram shows "Relationship Removed".
No. Removing a relationship removes the link between the two fields only. The tables and their rows stay as they are.
A field that takes part in a relationship carries a mark at the edge of its row: an asterisk for the many side and a minus for the one side.
The diagram shows "Failed to create reference" with "Unable to create table reference", and the new line disappears. Try the drag or the dialog again. A failed cardinality change shows "Failed to update relationship", and a failed removal shows "Reference remove failed".
Add/Modify Lake Objects. Creating, changing and removing a relationship all need it; without the permission the change is refused and the diagram shows the failure message with the reason. See Who can do what in the Lake.
Yes. Hover over a field's row and drag from a handle to the field you want to link. A dragged link starts as One to Many; change it afterwards in Set Relationship Type.