# Range 연산자

## 개요

증가하는 행의 시퀀스를 생성합니다. `range`.

```kusto
range <dest> from <start> to <end> step <size>
```

다음을 사용할 수 있습니다. `range` 증가하는 행 집합이 있는 테이블을 생성하는 데 사용되며, 데이터 시퀀스를 만들 때 유용할 수 있습니다.

시퀀스의 첫 번째 값은 `<start>`이며, 이후의 행은 다음 값을 더하여 생성됩니다. `<size>` 이전 행에 더합니다. 시퀀스의 최종 값은 다음 값보다 작거나 같은 마지막 값입니다. `<end>`—즉, 시퀀스는 다음 값을 포함합니다. `<end>`. `<dest>` 는 결과 시퀀스가 할당되는 필드의 이름입니다.  `<start>`, `<end>`, 그리고 `<step>` 의 값은 정수여야 합니다.

`range` 는 다음 중 하나입니다. [사용 가능한 PantherFlow 데이터 소스](/ko/pantherflow/statements.md#data-sources)이며, 테이블 소스로만 사용할 수 있습니다.

## 예시

### 시퀀스 생성

0부터 5까지(포함) 시퀀스를 생성합니다.

```kusto
range N from 0 to 5 step 1
```

| N |
| - |
| 0 |
| 1 |
| 2 |
| 3 |
| 4 |
| 5 |

### 더 큰 단계 크기로 시퀀스 생성

시퀀스는 다음 값보다 작거나 같은 마지막 숫자에서 끝납니다. `<end>`.

```kusto
range data from 1 to 4 step 2
```

출력:

| data |
| ---- |
| 1    |
| 3    |

### 타임스탬프 시퀀스 생성

`range` 는 시간 시퀀스를 만드는 데 사용할 수 있습니다.

```kusto
range data from 0 to 2 step 1
| project t = time.add(time.now(), data, 'h')
```

| t                          |
| -------------------------- |
| 2025-03-13 15:41:46.368000 |
| 2025-03-13 16:41:46.368000 |
| 2025-03-13 17:41:46.368000 |

### 시계열 분석을 위한 시간 버킷 생성

`range` 는 다른 연산자와 결합하여 시계열 분석을 수행할 수 있습니다. 아래 예시는 Panther 감사 로그를 매핑할 시간별 버킷을 생성합니다:

```kusto
let all_times = range N from 0 to 23 step 1 
| project bucket=time.add(time.now(), -1*N, "h") 
| project bucket=time.trunc('hour', bucket);

let all_actors = panther_logs.public.panther_audit 
| where p_event_time > time.ago(1d)
| summarize by actor=actor.name;

let zeroes = all_times
| join kind=cross actors=(all_actors)
| project bucket, actor=actors.actor, eventcount=0;

panther_logs.public.panther_audit 
| where p_event_time > time.ago(1d)
| extend bucket=time.trunc('hour', p_event_time)
| summarize eventcount=agg.count() by bucket, actor=actor.name
| union zeroes
| summarize eventcount=agg.sum(eventcount) by bucket, actor
| sort bucket asc, actor asc
| visualize line xcolumn=bucket, ycolumn=eventcount, series=actor, legend=bottom, title="지난 24시간 동안 사용자별 Panther 감사 작업 수"
```

<figure><img src="/files/c4e221ab4a3d8f2916954aec8779a663646bf546" alt="Under a &#x22;Count of Panther Audit Actions Per User Over Last 24 Hours&#x22; header is a line chart."><figcaption></figcaption></figure>


---

# Agent Instructions: 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/range.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.
