rightsemi join
Learn how to use the rightsemi join flavor to merge the rows of two tables.
The rightsemi
join flavor returns all records from the right side that match a record from the left side. Only columns from the right side are returned.
Syntax
LeftTable |
join
kind=rightsemi
[ Hints ] RightTable on
Conditions
Returns
Schema: All columns from the right table.
Rows: All records from the right table that match records from the left table.
Example
This query filters and returns only those rows from table Y that have a matching key in table X.
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=rightsemi Y on Key
Output
Key | Value2 |
---|---|
b | 10 |
c | 20 |
c | 30 |
Related content
- Learn about other join flavors
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.