다음을 통해 공유


project operator

Applies to: ✅Microsoft FabricAzure Data ExplorerAzure MonitorMicrosoft Sentinel

포함할 열을 선택하고 이름을 바꾸거나 삭제하고 새 계산된 열을 삽입합니다.

결과의 열 순서는 인수의 순서에 따라 지정됩니다. 인수에 지정된 열만 결과에 포함됩니다. 입력의 다른 열은 모두 삭제됩니다.

Syntax

T| project [ColumnName | (ColumnName[,])=] Expression [, ...]

or

T| projectColumnName [=Expression] [, ...]

Learn more about syntax conventions.

Parameters

Name Type Required Description
T string ✔️ 특정 열을 프로젝션할 테이블 형식 입력입니다.
ColumnName string 출력에 표시할 열 이름 또는 쉼표로 구분된 열 이름 목록입니다.
Expression string 입력을 통해 수행할 스칼라 식입니다.
  • Either ColumnName or Expression must be specified.
  • If there's no Expression, then a column of ColumnName must appear in the input.
  • If ColumnName is omitted, the output column name of Expression will be automatically generated.
  • If Expression returns more than one column, a list of column names can be specified in parentheses. If a list of the column names isn't specified, all Expression's output columns with generated names will be added to the output.

Note

입력의 기존 열과 이름이 같은 새 계산 열을 반환하지 않는 것이 좋습니다.

Returns

인수로 명명된 열이 있는 테이블입니다. 입력 테이블과 동일한 수의 행을 포함합니다.

Examples

이 섹션의 예제에서는 구문을 사용하여 시작하는 방법을 보여 줍니다.

The examples in this article use publicly available tables in the help cluster, such as the StormEvents table in the Samples database.

The examples in this article use publicly available tables, such as the Weather table in the Weather analytics sample gallery. 작업 영역의 테이블과 일치하도록 예제 쿼리에서 테이블 이름을 수정해야 할 수 있습니다.

특정 열만 표시

테이블의 EventId, StateEventType 만 표시합니다StormEvents.

StormEvents
| project EventId, State, EventType

Output

표에는 처음 10명의 결과가 표시됩니다.

EventId State EventType
61032 ATLANTIC SOUTH Waterspout
60904 FLORIDA Heavy Rain
60913 FLORIDA Tornado
64588 GEORGIA Thunderstorm Wind
68796 MISSISSIPPI Thunderstorm Wind
68814 MISSISSIPPI Tornado
68834 MISSISSIPPI Thunderstorm Wind
68846 MISSISSIPPI Hail
73241 AMERICAN SAMOA Flash Flood
64725 KENTUCKY Flood
... ... ...

프로젝트를 사용한 잠재적 조작

다음 쿼리는 열의 BeginLocation 이름을 바꾸고 두 개의 기존 열에 대한 계산에서 호출 TotalInjuries 되는 새 열을 만듭니다.

StormEvents
| project StartLocation = BeginLocation, TotalInjuries = InjuriesDirect + InjuriesIndirect
| where TotalInjuries > 5

Output

표에는 처음 10명의 결과가 표시됩니다.

StartLocation TotalInjuries
LYDIA 15
ROYAL 15
GOTHENBURG 9
PLAINS 8
KNOXVILLE 9
CAROL STREAM 11
HOLLY 9
RUFFIN 9
ENTERPRISE MUNI ARPT 50
COLLIERVILLE 6
... ...