Supported in: Batch
Return the K nearest rows from the right dataset for each row in the left dataset, based on the distance measure.
Transform categories: Join
Argument values:
airline
,fuzzy_airline
,Inputs: ri.foundry.main.dataset.left
tail_number | airline | miles | factor |
---|---|---|---|
XB-123 | foundry air | 124 | 2 |
MT-222 | new airline | 1123 | 5 |
PA-452 | new air | 212 | 2 |
ri.foundry.main.dataset.right
fuzzy_airline | home_airport |
---|---|
air | LHR |
new airline | CPH |
new plane | JFK |
old air | IAD |
Output:
rank | distance | tail_number | airline | fuzzy_airline | home_airport |
---|---|---|---|---|---|
1 | 3 | PA-452 | new air | old air | IAD |
2 | 4 | PA-452 | new air | air | LHR |
2 | 4 | PA-452 | new air | new airline | CPH |
2 | 4 | PA-452 | new air | new plane | JFK |
1 | 0 | MT-222 | new airline | new airline | CPH |
2 | 4 | MT-222 | new airline | new plane | JFK |
1 | 5 | XB-123 | foundry air | old air | IAD |
2 | 8 | XB-123 | foundry air | air | LHR |
Argument values:
airline
,airline
,Inputs: ri.foundry.main.dataset.left
tail_number | airline | miles | factor |
---|---|---|---|
XB-123 | foundry air | 124 | 2 |
MT-222 | new airline | 1123 | 5 |
PA-452 | new air | 212 | 2 |
ri.foundry.main.dataset.right
airline | home_airport |
---|---|
air | LHR |
new airline | CPH |
new plane | JFK |
old air | IAD |
Output:
rank | distance | tail_number | airline | home_airport |
---|---|---|---|---|
1 | 3 | PA-452 | new air | IAD |
2 | 4 | PA-452 | new air | LHR |
2 | 4 | PA-452 | new air | CPH |
2 | 4 | PA-452 | new air | JFK |
1 | 0 | MT-222 | new airline | CPH |
2 | 4 | MT-222 | new airline | JFK |
1 | 5 | XB-123 | foundry air | IAD |
2 | 8 | XB-123 | foundry air | LHR |
Description: If the distance measure returns null, this is considered the furthest distance. Argument values:
airline
,fuzzy_airline
,Inputs: ri.foundry.main.dataset.left
tail_number | airline | miles | factor |
---|---|---|---|
XB-123 | foundry air | 124 | 2 |
MT-222 | new airline | 1123 | 5 |
PA-452 | new air | 212 | 2 |
ri.foundry.main.dataset.right
fuzzy_airline | home_airport |
---|---|
air | LHR |
null | CPH |
new plane | JFK |
old air | IAD |
Output:
rank | distance | tail_number | airline | fuzzy_airline | home_airport |
---|---|---|---|---|---|
1 | 3 | PA-452 | new air | old air | IAD |
2 | 4 | PA-452 | new air | air | LHR |
2 | 4 | PA-452 | new air | new plane | JFK |
1 | 4 | MT-222 | new airline | new plane | JFK |
2 | 7 | MT-222 | new airline | old air | IAD |
1 | 5 | XB-123 | foundry air | old air | IAD |
2 | 8 | XB-123 | foundry air | air | LHR |
Argument values:
airline
,fuzzy_airline
,Inputs: ri.foundry.main.dataset.left
tail_number | airline | miles | factor |
---|---|---|---|
XB-123 | foundry air | 124 | 2 |
MT-222 | new airline | 1123 | 5 |
PA-452 | new air | 212 | 2 |
ri.foundry.main.dataset.right
fuzzy_airline | home_airport |
---|---|
air | LHR |
new airline | CPH |
new plane | JFK |
old air | IAD |
Output:
rank | distance | tail_number | airline | right_fuzzy_airline | right_home_airport |
---|---|---|---|---|---|
1 | 3 | PA-452 | new air | old air | IAD |
2 | 4 | PA-452 | new air | air | LHR |
2 | 4 | PA-452 | new air | new airline | CPH |
2 | 4 | PA-452 | new air | new plane | JFK |
1 | 0 | MT-222 | new airline | new airline | CPH |
2 | 4 | MT-222 | new airline | new plane | JFK |
1 | 5 | XB-123 | foundry air | old air | IAD |
2 | 8 | XB-123 | foundry air | air | LHR |