Nota
O acesso a esta página requer autorização. Podes tentar iniciar sessão ou mudar de diretório.
O acesso a esta página requer autorização. Podes tentar mudar de diretório.
Applies to: ✅Microsoft Fabric✅Azure Data Explorer✅Azure Monitor✅Microsoft Sentinel
Executa vários operadores de consumo em paralelo.
Syntax
T|fork [name=](subquery) [name=](subquery) ...
Learn more about syntax conventions.
Parameters
| Name | Tipo | Required | Description |
|---|---|---|---|
| subquery | string |
✔️ | Um pipeline a jusante de operadores de consulta suportados. |
| name | string |
Um nome temporário para a tabela de resultados da subconsulta. |
Note
- Avoid using
forkwith a single subquery. - O nome da guia de resultados é o mesmo nome fornecido com o parâmetro
nameou o operadoras.
Operadores de consulta suportados
ascountextendparsewheretakeprojectproject-awayproject-keepproject-renameproject-reordersummarizetoptop-nestedsortmv-expandreduce
Returns
Multiple result tables, one for each of the subquery arguments.
Tips
Use
materializecomo um substituto parajoinouunionem pernas de garfo. O fluxo de entrada é armazenado em cache por materialize e, em seguida, a expressão em cache pode ser usada em pernas de junção/união.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. Talvez seja necessário modificar o nome da tabela na consulta de exemplo para corresponder à tabela em seu espaço de trabalho.
O exemplo a seguir retorna duas tabelas com colunas sem nome.
StormEvents
| where State == "FLORIDA"
| fork
( where DeathsDirect + DeathsIndirect > 1)
( where InjuriesDirect + InjuriesIndirect > 1)
Output
Esta saída mostra as primeiras linhas e colunas da tabela de resultados.
| 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
Nos exemplos a seguir, a tabela de resultados é chamada "StormsWithDeaths" e "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
Esta saída mostra as primeiras linhas e colunas da tabela de resultados.
| 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 |