共用方式為


project-keep operator

Applies to: ✅Microsoft FabricAzure Data ExplorerAzure MonitorMicrosoft Sentinel

從輸入中選取要包留在輸出中的資料行。 結果中只會顯示指定為自變數的數據行。 排除其他數據行。

Syntax

T| project-keepColumnNameOrPattern [, ...]

Learn more about syntax conventions.

Parameters

Name 類型 Required Description
T string ✔️ 要保留數據行的來源表格式輸入。
ColumnNameOrPattern string ✔️ 要保留在輸出中的一或多個數據行名稱或數據行通配符模式。

Returns

具有數據行的數據表,其名稱為自變數。 包含與輸入數據表相同的數據列數目。

Tip

您可以在 project-keep 原始資料表或做為查詢的一部分計算的任何資料行。

Note

結果中的數據行順序取決於其在數據表中的原始順序。 只會保留指定為自變數的數據行。 其他數據行會從結果中排除。

Example

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. 您可能需要修改範例查詢中的資料表名稱,以符合工作區中的資料表。

此查詢會從包含 「session」 這個字的 ConferenceSessions 數據表傳回數據行。

ConferenceSessions
| project-keep session*

Output

輸出數據表只會顯示前10個結果。

sessionid session_title session_type session_location
COM64 焦點群組:Azure 數據總管 Focus Group Online
COM65 焦點群組:Azure 數據總管 Focus Group Online
COM08 詢問小組:Azure 數據總管 詢問小組 Online
COM137 焦點群組:Azure 數據總管中的內建儀錶板和智慧型手機自動調整功能 Focus Group Online
CON-PRT157 圓桌:監視和管理 Azure 數據總管部署 Roundtable Online
CON-PRT103 Roundtable:Advanced Kusto 查詢語言主題 Roundtable Online
CON-PRT157 圓桌:監視和管理 Azure 數據總管部署 Roundtable Online
CON-PRT103 Roundtable:Advanced Kusto 查詢語言主題 Roundtable Online
CON-PRT130 圓形數據表:使用 Azure 數據總管進行數據探索和視覺效果 Roundtable Online
CON-PRT130 圓形數據表:使用 Azure 數據總管進行數據探索和視覺效果 Roundtable Online
... ... ... ...