pack_array()pack_array()

将所有输入值打包为动态数组。Packs all input values into a dynamic array.

语法Syntax

pack_array(Expr1[, *Expr2*])`pack_array(Expr1[, *Expr2*])`

参数Arguments

  • Expr1...N:要打包到动态数组中的输入表达式。Expr1...N: Input expressions to be packed into a dynamic array.

返回Returns

动态数组,其中包含 Expr1、Expr2、...、ExprN 的值。Dynamic array which includes the values of Expr1, Expr2, ... , ExprN.

示例Example

range x from 1 to 3 step 1
| extend y = x * 2
| extend z = y * 2
| project pack_array(x,y,z)
Column1Column1
[1,2,4][1,2,4]
[2,4,8][2,4,8]
[3,6,12][3,6,12]
range x from 1 to 3 step 1
| extend y = tostring(x * 2)
| extend z = (x * 2) * 1s
| project pack_array(x,y,z)
Column1Column1
[1,"2","00:00:02"][1,"2","00:00:02"]
[2,"4","00:00:04"][2,"4","00:00:04"]
[3,"6","00:00:06"][3,"6","00:00:06"]