title | description | ms.reviewer | ms.topic | ms.date |
---|---|---|---|---|
leftsemi join |
Learn how to use the leftsemi join flavor to merge the rows of two tables. |
alexans |
reference |
06/18/2023 |
The leftsemi
join flavor returns all records from the left side that match a record from the right side. Only columns from the left side are returned.
:::image type="content" source="media/joinoperator/join-leftsemi.png" alt-text="Diagram that shows how the join works." lightbox="media/joinoperator/join-kinds.png":::
LeftTable |
join
kind=leftsemi
[ Hints ] RightTable on
Conditions
[!INCLUDE syntax-conventions-note]
[!INCLUDE join-parameters-attributes-hints]
Schema: All columns from the left table.
Rows: All records from the left table that match records from the right table.
[!div class="nextstepaction"] Run the query
let X = datatable(Key:string, Value1:long)
[
'a',1,
'b',2,
'b',3,
'c',4
];
let Y = datatable(Key:string, Value2:long)
[
'b',10,
'c',20,
'c',30,
'd',40
];
X | join kind=leftsemi Y on Key
Output
Key | Value1 |
---|---|
b | 2 |
b | 3 |
c | 4 |