Skip to content

Latest commit

 

History

History
57 lines (43 loc) · 1.54 KB

join-leftsemi.md

File metadata and controls

57 lines (43 loc) · 1.54 KB
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

leftsemi join

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":::

Syntax

LeftTable | join kind=leftsemi [ Hints ] RightTable on Conditions

[!INCLUDE syntax-conventions-note]

[!INCLUDE join-parameters-attributes-hints]

Returns

Schema: All columns from the left table.
Rows: All records from the left table that match records from the right table.

Example

[!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