你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
bag_pack_columns()
Applies to: ✅ Microsoft Fabric ✅ Azure Data Explorer ✅ Azure Monitor ✅ Microsoft Sentinel
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" } |