You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: llms-full.txt
+13-3Lines changed: 13 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# DataJoint Documentation (Full)
2
2
3
-
Generated: 2026-02-04 14:47:26 UTC
3
+
Generated: 2026-02-04 14:49:36 UTC
4
4
Commit: unknown
5
5
Branch: unknown
6
6
@@ -30849,14 +30849,24 @@ result = A.join(B, semantic_check=True, left=False)
30849
30849
30850
30850
### 4.3 Join Condition
30851
30851
30852
-
Joins match on all shared non-hidden attributes (namesakes):
30852
+
With `semantic_check=True` (default), joins match only on **homologous namesakes**—attributes with the same name AND same lineage (traced through foreign keys to the same original definition):
30853
30853
30854
30854
```python
30855
-
# If Session has (subject_id, session_id) and Trial has (subject_id, session_id, trial_id)
30855
+
# Session has (subject_id, session_id) and Trial has (subject_id, session_id, trial_id)
30856
+
# Both subject_id attributes trace to Subject.subject_id via foreign keys
30856
30857
# Join matches on (subject_id, session_id)
30857
30858
Session * Trial
30858
30859
```
30859
30860
30861
+
With `semantic_check=False`, joins match on **all namesakes** regardless of lineage (natural join):
30862
+
30863
+
```python
30864
+
# Match on any shared attribute names, ignoring lineage
30865
+
A.join(B, semantic_check=False)
30866
+
```
30867
+
30868
+
See [Section 9: Semantic Matching](#9-semantic-matching) for details on attribute lineage.
30869
+
30860
30870
### 4.4 Primary Key Determination
30861
30871
30862
30872
The result's primary key depends on functional dependencies:
<p>Joins match on all shared non-hidden attributes (namesakes):</p>
8176
-
<divclass="highlight"><pre><span></span><code><spanclass="c1"># If Session has (subject_id, session_id) and Trial has (subject_id, session_id, trial_id)</span>
8175
+
<p>With <code>semantic_check=True</code> (default), joins match only on <strong>homologous namesakes</strong>—attributes with the same name AND same lineage (traced through foreign keys to the same original definition):</p>
8176
+
<divclass="highlight"><pre><span></span><code><spanclass="c1"># Session has (subject_id, session_id) and Trial has (subject_id, session_id, trial_id)</span>
8177
+
<spanclass="c1"># Both subject_id attributes trace to Subject.subject_id via foreign keys</span>
8177
8178
<spanclass="c1"># Join matches on (subject_id, session_id)</span>
0 commit comments