Bearbeiten

Freigeben über


pack_array()

Applies to: ✅ Microsoft FabricAzure Data ExplorerAzure MonitorMicrosoft Sentinel

Packs all input values into a dynamic array.

Syntax

pack_array(value1, [ value2, ... ])

pack_array(*)

Learn more about syntax conventions.

Parameters

Name Type Required Description
value1...valueN string ✔️ Input expressions to be packed into a dynamic array.
The wildcard * string Providing the wildcard * packs all input columns into a dynamic array.

Returns

A dynamic array that includes the values of value1, value2, ... valueN.

Example

range x from 1 to 3 step 1
| extend y = x * 2
| extend z = y * 2
| project pack_array(x, y, z)

Output

Column1
[1,2,4]
[2,4,8]
[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)

Output

Column1
[1,"2","00:00:02"]
[2,"4","00:00:04"]
[3,"6","00:00:06"]