> For the complete documentation index, see [llms.txt](https://docs.panther.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.panther.com/ko/pantherflow/operators/join.md).

# Join 연산자

## 개요

다음으로 데이터 보강 `조인`.

```kusto
| join kind=<kind> <dest>=(<target_query>) on <condition>
```

다음이 `조인` 가 수행되면, 파이프의 행이 다음의 행과 일치됩니다 `<target_query>` 다음을 기준으로 `<condition>`. 결과 데이터에는 파이프의 원래 필드가 모두 포함되며, 다음의 필드가 `<target_query>` 다음에 `<dest>` 필드에 추가됩니다. 반환되는 행은 다음으로 제어됩니다 `<kind>`.

### `<target_query>`

해당 `대상 쿼리` 조인될 데이터입니다. 이는 단순한 테이블 이름처럼 유효한 쿼리라면 무엇이든 될 수 있습니다 `(some_table)` 또는 더 복잡한 문장 `(some_table | extend id = a + b)`.

### `<condition>`

해당 `<condition>` 파이프의 어떤 행이 다음의 행과 조인될지 제어하는 데 사용되는 식입니다. 모든 조인에 필요합니다 `<target_query>`. 모든 조인에 필요합니다 `<kind>` 다음을 제외하고 `크로스` 조인입니다. 조인에는 `$left` 측(파이프)과 `$right` 측(다음의 `<target_query>`). 예를 들어, 다음 조건은 `$left.id == $right.id` 같은 값을 포함하는 행을 일치시킵니다 `id`.

### `<kind>`

다음을 사용하여 출력할 행을 제어합니다 `종류`.

<table><thead><tr><th width="189">종류 값</th><th>설명</th></tr></thead><tbody><tr><td><code>inner</code></td><td>다음에서 일치하는 행만 반환합니다 <code>조건</code>.</td></tr><tr><td><code>왼쪽 외부</code></td><td>파이프의 모든 행을 다음의 필드로 보강하여 반환합니다 <code>대상 쿼리</code>일치하지 않는 행에는 <code>null</code> 다음의 열에 대해 <code>대상 쿼리</code>.</td></tr><tr><td><code>오른쪽 외부</code></td><td>다음의 모든 행을 반환합니다 <code>대상 쿼리</code> 파이프의 필드로 보강되며, 일치하지 않는 행에는 <code>null</code> 파이프의 열에 대해</td></tr><tr><td><code>전체 외부</code></td><td>파이프와 다음 양쪽의 행을 반환합니다 <code>대상 쿼리</code>, 일치하지 않는 행도 포함합니다.</td></tr><tr><td><code>크로스</code></td><td>파이프의 모든 행을 다음의 모든 행과 결합하여 반환합니다 <code>대상 쿼리</code> .</td></tr></tbody></table>

## 예시

### IP 주소로 조인

파이프의 다음 필드에 IP 주소가 있다고 가정해 봅시다 `sourceIP` 필드가 있고, 다음 이름의 테이블의 데이터로 이를 보강하려고 합니다 `ip_location` 다음 이름의 필드에 IP 주소를 포함하는 `ip`.

다음을 사용할 수 있습니다 `<condition>` 형식의 `$left.sourceIp == $right.ip` IP 주소를 기준으로 행을 일치시키고 `kind=leftouter` 파이프의 모든 행을 반환합니다. 여기에는 다음에서 누락될 수 있는 행도 포함됩니다 `ip_location`.

```kusto
<source_table>
| join kind=leftouter ip=(ip_location) on $left.sourceIP == $right.ip
```

### 다음과 조인 `tor_exit_nodes` 표

이 예제에서는 다음을 사용합니다 `inner` 조인을 사용하여 다음을 찾습니다 `aws_alb` 다음을 가진 로그 `clientIp` Panther가 관리하는 [`tor_exit_node` 보강 공급자](/ko/enrichment/tor-exit-nodes.md) 테이블.

```kusto
aws_alb
| join kind=inner tor=(panther_lookups.public.tor_exit_nodes) on        
       $left.clientIp == $right.ip
| limit 10
```

### 다음과 조인 `ipinfo_location_datalake` UDF를 사용한 테이블

다음은 Panther가 관리하는 항목으로 ALB 로그를 보강하는 더 복잡한 예제입니다 [`ipinfo_location_datalake` 보강 공급자](/ko/enrichment/ipinfo.md) 테이블.

이 쿼리는 다음을 사용한다는 점에 유의하세요 [`snowflake.func`](https://docs.panther.com/ko/pantherflow/operators/pages/0d2f84d8cdf80073c7a4b8cc33d14a602bf4fa72#snowflake.func) 함수입니다. 이 함수는 SQL 사용자 정의 함수(UDF)를 호출합니다 `panther_lookups.public.ipinfo_to_join_key()` 및 `panther_lookups.public.ipinfo_to_int()`, 인수로 IP 주소를 받습니다. 이러한 UDF에 대해 자세히 알아보려면 [IPinfo](/ko/enrichment/ipinfo.md#using-a-joinkey).

```kusto
aws_alb
| where p_event_time > time.ago(1d)
| join kind=leftouter ip=(panther_lookups.public.ipinfo_location_datalake) on        
       snowflake.func('panther_lookups.public.ipinfo_to_join_key', $right.joinKey) == snowflake.func('panther_lookups.public.ipinfo_to_join_key', $left.clientIp)
       그리고 snowflake.func('panther_lookups.public.ipinfo_to_int', $left.clientIp)가 다음 사이에 있는 
       snowflake.func('panther_lookups.public.ipinfo_to_int', $right.startIP) .. snowflake.func('panther_lookups.public.ipinfo_to_int', $right.endIP)
| project p_event_time, clientIp, city=ip.city, country=ip.country
| limit 10
```

### 다음을 사용하여 조인 `데이터 테이블`

샘플 데이터를 다음에 주입할 수 있습니다 `조인` 다음을 사용하여 [`데이터 테이블`](/ko/pantherflow/operators/datatable.md) 연산자:

```kusto
aws_alb
| join kind=inner system_info=(datatable [{"ip":"192.168.1.1", "hostname":"fluffy"}, {"ip":"192.168.1.2", "hostname":"squishy"}]) on        
       $left.clientIp == $right.ip
| limit 10
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.panther.com/ko/pantherflow/operators/join.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
