Nuta
Dostęp do tej strony wymaga autoryzacji. Możesz spróbować się zalogować lub zmienić katalog.
Dostęp do tej strony wymaga autoryzacji. Możesz spróbować zmienić katalogi.
Applies to: ✅Microsoft Fabric✅Azure Data Explorer✅Azure Monitor✅Microsoft Sentinel
Uruchamia równolegle wiele operatorów odbiorców.
Syntax
T|fork [name=](subquery) [name=](subquery) ...
Learn more about syntax conventions.
Parameters
| Name | Typ | Required | Description |
|---|---|---|---|
| subquery | string |
✔️ | Potok podrzędny obsługiwanych operatorów zapytań. |
| name | string |
Tymczasowa nazwa tabeli wyników podzapytania. |
Note
- Avoid using
forkwith a single subquery. - Nazwa karty wyników jest taka sama jak w przypadku parametru
namelub operatoraas.
Obsługiwane operatory zapytań
ascountextendparsewheretakeprojectproject-awayproject-keepproject-renameproject-reordersummarizetoptop-nestedsortmv-expandreduce
Returns
Multiple result tables, one for each of the subquery arguments.
Tips
Należy użyć
materializejako zamiennik dlajoinlubunionna rozwidleniu nóg. Strumień wejściowy jest buforowany przez zmaterializowanie, a następnie buforowane wyrażenie może być używane w nogach sprzężenia/unii.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. Może być konieczne zmodyfikowanie nazwy tabeli w przykładowym zapytaniu, aby było zgodne z tabelą w obszarze roboczym.
Poniższy przykład zwraca dwie tabele z nienazwanych kolumnami.
StormEvents
| where State == "FLORIDA"
| fork
( where DeathsDirect + DeathsIndirect > 1)
( where InjuriesDirect + InjuriesIndirect > 1)
Output
Te dane wyjściowe przedstawiają kilka pierwszych wierszy i kolumn tabeli wyników.
| 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
W poniższych przykładach tabela wyników nosi nazwę "StormsWithDeaths" i "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
Te dane wyjściowe przedstawiają kilka pierwszych wierszy i kolumn tabeli wyników.
| 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 |