> 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>`

다음으로 반환되는 행을 제어합니다 `kind`.

<table><thead><tr><th width="189">kind 값</th><th>설명</th></tr></thead><tbody><tr><td><code>inner</code></td><td>다음에서 일치하는 행만 반환합니다 <code>조건</code>.</td></tr><tr><td><code>leftouter</code></td><td>파이프의 모든 행을 다음의 필드로 보강하여 반환합니다 <code>대상 쿼리</code>, 일치하지 않는 행에는 <code>null</code> 다음의 열에 대해 <code>대상 쿼리</code>.</td></tr><tr><td><code>rightouter</code></td><td>다음의 모든 행을 반환합니다 <code>대상 쿼리</code> 파이프의 필드로 보강하여, 일치하지 않는 행에는 <code>null</code> 파이프의 열에 대해</td></tr><tr><td><code>fullouter</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` Enrichment Provider](/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를 사용하여 테이블

다음은 더 복잡한 예시로, 여기서는 ALB 로그를 Panther에서 관리하는 다음으로 보강합니다 [`ipinfo_location_datalake` Enrichment Provider](/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
```

### 다음을 사용하여 조인 `datatable`

샘플 데이터를 다음에 주입할 수 있습니다 `조인` 다음을 사용하여 [`datatable`](/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:

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

The question should be specific, self-contained, and written in natural language.
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.
