Applies to: ✅Microsoft Fabric✅Azure Data Explorer✅Azure Monitor✅Microsoft Sentinel
表形式の式ステートメントは、ユーザーがクエリについて話すときに通常念頭に置くものです。 通常、このステートメントはステートメント リストの最後に表示され、入力とその出力はテーブルまたは表形式のデータセットで構成されます。 2 つのステートメントは、セミコロンで区切る必要があります。
表形式の式ステートメントは、通常、テーブル、表形式のデータ演算子フィルターやプロジェクションなどの表形式のデータ ソース、およびオプションのレンダリング演算子で構成されます。 コンポジションはパイプ文字 (|
) で表され、左から右への表形式データのフローを視覚的に表す通常の形式がステートメントに与えられます。
各演算子は、"パイプから" 表形式のデータセットと、演算子の本体からより多くの表形式データセットを含む他の入力を受け入れ、次の演算子に表形式データセットを出力します。
Syntax
Source|
Operator1|
Operator2|
RenderInstruction
Learn more about syntax conventions.
Parameters
Name | タイプ | Required | Description |
---|---|---|---|
Source | string |
✔️ | 表形式のデータ ソース。 表形式のデータ ソースを参照してください。 |
Operator | string |
✔️ | フィルターやプロジェクションなどの表形式データ演算子。 |
RenderInstruction | string |
レンダリング演算子または命令。 |
表形式のデータ ソース
表形式のデータ ソースは、レコードのセットを生成します。このレコードのセットは表形式のデータ演算子によってさらに処理されます。 次の一覧は、サポートされている表形式のデータ ソースを示しています。
- Table references
- The tabular range operator
- The print operator
- テーブルを返す関数の呼び出し
- A table literal ("datatable")
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. ワークスペース内のテーブルと一致するように、クエリ例のテーブル名を変更する必要がある場合があります。
条件で行をフィルター処理する
このクエリは、StormEvents
列の値が "FLORIDA" である State
テーブル内のレコード数をカウントします。
StormEvents
| where State == "FLORIDA"
| count
Output
Count |
---|
1042 |
2 つのテーブルのデータを結合する
In this example, the join operator is used to combine records from two tabular data sources: the StormEvents
table and the PopulationData
table.
StormEvents
| where InjuriesDirect + InjuriesIndirect > 50
| join (PopulationData) on State
| project State, Population, TotalInjuries = InjuriesDirect + InjuriesIndirect
Output
State | Population | TotalInjuries |
---|---|---|
ALABAMA | 4918690 | 60 |
CALIFORNIA | 39562900 | 61 |
KANSAS | 2915270 | 63 |
MISSOURI | 6153230 | 422 |
OKLAHOMA | 3973710 | 200 |
TENNESSEE | 6886720 | 187 |
TEXAS | 29363100 | 137 |