Applies to: ✅Microsoft Fabric✅Azure Data Explorer✅Azure Monitor✅Microsoft Sentinel
複数のコンシューマー演算子を並列実行します。
Syntax
T|fork [name=](subquery) [name=](subquery) ...
Learn more about syntax conventions.
Parameters
| Name | タイプ | Required | Description |
|---|---|---|---|
| subquery | string |
✔️ | サポートされているクエリ演算子のダウンストリーム パイプライン。 |
| name | string |
サブクエリ結果テーブルの一時名。 |
Note
- Avoid using
forkwith a single subquery. - 結果タブの名前は、
nameパラメーターまたはas演算子で指定された名前と同じです。
サポートされているクエリ演算子
ascountextendparsewheretakeprojectproject-awayproject-keepproject-renameproject-reordersummarizetoptop-nestedsortmv-expandreduce
Returns
Multiple result tables, one for each of the subquery arguments.
Tips
フォーク脚の
materializeまたはjoinの代わりにunionを使用します。 入力ストリームは具体化によってキャッシュされ、キャッシュされた式は結合/共用体の脚で使用できます。Use batch with
materializeof tabular expression statements instead of theforkoperator.
Examples
The examples in this article use publicly available tables in the help cluster, such as the
StormEventstable in the Samples database.
The examples in this article use publicly available tables, such as the
Weathertable in the Weather analytics sample gallery. ワークスペース内のテーブルと一致するように、クエリ例のテーブル名を変更する必要がある場合があります。
次の例では、名前のない列を持つ 2 つのテーブルを返します。
StormEvents
| where State == "FLORIDA"
| fork
( where DeathsDirect + DeathsIndirect > 1)
( where InjuriesDirect + InjuriesIndirect > 1)
Output
この出力には、結果テーブルの最初のいくつかの行と列が表示されます。
| StartTime | EndTime | EpisodeId | EventId | State | EventType | InjuriesDirect | InjuriesIndirect |
|---|---|---|---|---|---|---|---|
| 2007-02-02T03:17:00Z | 2007-02-02T03:25:00Z | 3464 | 18948 | FLORIDA | Tornado | 10 | 0 |
| 2007-02-02T03:37:00Z | 2007-02-02T03:55:00Z | 3464 | 18950 | FLORIDA | Tornado | 9 | 0 |
| 2007-03-13T08:20:00Z | 2007-03-13T08:20:00Z | 4094 | 22961 | FLORIDA | Dense Fog | 3 | 0 |
| 2007-09-11T15:26:00Z | 2007-09-11T15:26:00Z | 9578 | 53798 | FLORIDA | Rip Current | 0 | 0 |
Named subqueries
次の例では、結果テーブルの名前は "StormsWithDeaths" と "StormsWithInjuries" です。
StormEvents
| where State == "FLORIDA"
| fork
(where DeathsDirect + DeathsIndirect > 1 | as StormsWithDeaths)
(where InjuriesDirect + InjuriesIndirect > 1 | as StormsWithInjuries)
StormEvents
| where State == "FLORIDA"
| fork
StormsWithDeaths = (where DeathsDirect + DeathsIndirect > 1)
StormsWithInjuries = (where InjuriesDirect + InjuriesIndirect > 1)
Output
この出力には、結果テーブルの最初のいくつかの行と列が表示されます。
| StartTime | EndTime | EpisodeId | EventId | State | EventType | InjuriesDirect | InjuriesIndirect |
|---|---|---|---|---|---|---|---|
| 2007-02-02T03:17:00Z | 2007-02-02T03:25:00Z | 3464 | 18948 | FLORIDA | Tornado | 10 | 0 |
| 2007-02-02T03:37:00Z | 2007-02-02T03:55:00Z | 3464 | 18950 | FLORIDA | Tornado | 9 | 0 |
| 2007-03-13T08:20:00Z | 2007-03-13T08:20:00Z | 4094 | 22961 | FLORIDA | Dense Fog | 3 | 0 |
| 2007-09-11T15:26:00Z | 2007-09-11T15:26:00Z | 9578 | 53798 | FLORIDA | Rip Current | 0 | 0 |