bag_pack_columns()

Creates a dynamic property bag object from a list of columns.

Syntax

bag_pack_columns(column1, column2,... )

Learn more about syntax conventions.

Parameters

Name Type Required Description
column scalar ✔️ A column to pack. The name of the column is the property name in the property bag.

Returns

Returns a dynamic property bag object from the listed columns.

Examples

The following example creates a property bag that includes the Id and Value columns:

datatable(Id: string, Value: string, Other: long)
[
    "A", "val_a", 1,
    "B", "val_b", 2,
    "C", "val_c", 3
]
| extend Packed = bag_pack_columns(Id, Value)
Id Value Other Packed
A val_a 1 {
"Id": "A",
"Value": "val_a"
}
B val_b 2 {
"Id": "B",
"Value": "val_b"
}
C val_c 3 {
"Id": "C",
"Value": "val_c"
}