왼쪽 조회 조인
| 항목 | 값 |
|---|---|
| 화면 이름 | Left lookup join |
| 식별자 | leftLookupJoinV2 |
| 지원 실행 방식 | Streaming |
| 범주 | 조인 (Join) |
왼쪽의 모든 행을 유지하고 오른쪽 데이터셋에서 일치하는 행을 결합합니다.
입력 인자
| 이름 | 지정 여부 | 자료형 | 의미와 조건 |
|---|---|---|---|
Condition for columns to select on the left | 필수 | ColumnPredicate | 왼쪽 스키마의 각 열을 검사하여 조건에 맞는 열만 출력으로 선택합니다. |
Condition for columns to select on the right | 필수 | ColumnPredicate | 오른쪽 스키마의 각 열을 검사하여 조건에 맞는 열만 출력으로 선택합니다. |
Join condition | 필수 | List<Tuple<Column<Boolean | Byte | Date | Double | Float | Integer | Long | Short | String | Timestamp>, Column<Boolean | Byte | Date | Double | Float | Integer | Long | Short | String | Timestamp>>> | 조인할 왼쪽과 오른쪽 열쌍의 목록입니다. |
Left dataset | 필수 | Table | 조인에 사용할 왼쪽 데이터셋입니다. |
Max rows to join with a single row | 필수 | Literal<Integer> | 왼쪽 행 하나에 결합할 수 있는 오른쪽 행의 최대 수입니다. 상한은 10이며 지나치게 높이면 성능에 영향을 줄 수 있습니다. |
Right dataset | 필수 | Table | 조인에 사용할 오른쪽 데이터셋입니다. |
Prefix for columns from right | 선택 | Literal<String> | 오른쪽의 모든 열에 붙일 접두사입니다. |
입출력 예시
예시 1: 기본 동작
인자 값:
Condition for columns to select on the left:
columnNameIsIn(
columnNames: [tail_number, airline],
)Condition for columns to select on the right:
columnNameIsIn(
columnNames: [home_airport],
)Join condition: [(tail_number,tail_number)]Left dataset: ri.foundry.main.dataset.leftMax rows to join with a single row: 10Right dataset: ri.foundry.main.dataset.rightPrefix for columns from right: null
입력:
ri.foundry.main.dataset.left
| tail_number | airline | miles | factor |
|---|---|---|---|
| XB-123 | foundry air | 124 | 2 |
| MT-222 | new airline | 1123 | 5 |
| XB-123 | foundry airline | 335 | 5 |
| MT-222 | new air | 565 | 4 |
| KK-452 | new air | 222 | 1 |
| PA-452 | new air | 212 | 2 |
| XB-123 | foundry airline | 1134 | 2 |
ri.foundry.main.dataset.right
| tail_number | home_airport |
|---|---|
| XB-123 | LHR |
| MT-222 | CPH |
| KK-452 | JFK |
| JR-201 | IAD |
출력:
| tail_number | airline | home_airport |
|---|---|---|
| XB-123 | foundry air | LHR |
| MT-222 | new airline | CPH |
| XB-123 | foundry airline | LHR |
| MT-222 | new air | CPH |
| KK-452 | new air | JFK |
| PA-452 | new air | null |
| XB-123 | foundry airline | LHR |
예시 2: 기본 동작
인자 값:
Condition for columns to select on the left:
columnNameIsIn(
columnNames: [tail_number, airline, factor],
)Condition for columns to select on the right:
columnNameIsIn(
columnNames: [home_airport],
)Join condition: [(tail_number,tail_number), (factor,factor)]Left dataset: ri.foundry.main.dataset.leftMax rows to join with a single row: 10Right dataset: ri.foundry.main.dataset.rightPrefix for columns from right: null
입력:
ri.foundry.main.dataset.left
| tail_number | airline | miles | factor |
|---|---|---|---|
| XB-123 | foundry air | 124 | 2 |
| MT-222 | new airline | 1123 | 5 |
| XB-123 | foundry airline | 335 | 5 |
| MT-222 | new air | 565 | 4 |
| KK-452 | new air | 222 | 1 |
| PA-452 | new air | 212 | 2 |
| XB-123 | foundry airline | 1134 | 2 |
ri.foundry.main.dataset.right
| tail_number | home_airport | factor |
|---|---|---|
| XB-123 | LHR | 2 |
| MT-222 | CPH | 1 |
| KK-452 | JFK | 10 |
| JR-201 | IAD | 4 |
출력:
| tail_number | airline | factor | home_airport |
|---|---|---|---|
| XB-123 | foundry air | 2 | LHR |
| MT-222 | new airline | 5 | null |
| XB-123 | foundry airline | 5 | null |
| MT-222 | new air | 4 | null |
| KK-452 | new air | 1 | null |
| PA-452 | new air | 2 | null |
| XB-123 | foundry airline | 2 | LHR |
예시 3: 기본 동작
인자 값:
Condition for columns to select on the left:
allColumns(
)Condition for columns to select on the right:
columnNameIsIn(
columnNames: [home_airport],
)Join condition: [(tail_number,tail_number)]Left dataset: ri.foundry.main.dataset.leftMax rows to join with a single row: 10Right dataset: ri.foundry.main.dataset.rightPrefix for columns from right: null
입력:
ri.foundry.main.dataset.left
| tail_number | airline | miles | factor |
|---|---|---|---|
| XB-123 | foundry air | 124 | 2 |
| MT-222 | new airline | 1123 | 5 |
| XB-123 | foundry airline | 335 | 5 |
| MT-222 | new air | 565 | 4 |
| KK-452 | new air | 222 | 1 |
| PA-452 | new air | 212 | 2 |
| XB-123 | foundry airline | 1134 | 2 |
ri.foundry.main.dataset.right
| tail_number | home_airport |
|---|---|
| XB-123 | LHR |
| XB-123 | LGW |
| MT-222 | CPH |
| KK-452 | JFK |
| JR-201 | IAD |
출력:
| tail_number | airline | miles | factor | home_airport |
|---|---|---|---|---|
| XB-123 | foundry air | 124 | 2 | LHR |
| XB-123 | foundry air | 124 | 2 | LGW |
| MT-222 | new airline | 1123 | 5 | CPH |
| XB-123 | foundry airline | 335 | 5 | LHR |
| XB-123 | foundry airline | 335 | 5 | LGW |
| MT-222 | new air | 565 | 4 | CPH |
| KK-452 | new air | 222 | 1 | JFK |
| PA-452 | new air | 212 | 2 | null |
| XB-123 | foundry airline | 1134 | 2 | LHR |
| XB-123 | foundry airline | 1134 | 2 | LGW |