join matches rows from a left and right tabular expression by one or more keys, then returns columns according to the selected join flavor.
SigninLogs
| where ResultType != 0
| project UserPrincipalName, IPAddress, TimeGenerated
| join kind=inner (
IdentityInfo
| project AccountUPN, Department
) on $left.UserPrincipalName == $right.AccountUPN
| Join flavor | Result |
|---|
inner | Every combination of matching rows. |
innerunique | Deduplicates the left side by key before matching; the default. |
leftouter | Every left row plus matching right data; null when absent. |
leftsemi | Left rows that have a match. |
leftanti | Left rows that do not have a match. |
fullouter | All rows from both sides, matched where possible. |
Exam takeaway: filter and project both sides before joining, and place the smaller dataset on the left when practical.
Official lessonCorrelation keys and join flavors