extent_id()extent_id()

返回标识当前记录所在的数据分片(“盘区”)的唯一标识符。Returns a unique identifier that identifies the data shard ("extent") that the current record resides in.

将此函数应用于未附加到数据分片的计算数据将返回空的 guid(全为零)。Applying this function to calculated data which is not attached to a data shard returns an empty guid (all zeros).

语法Syntax

extent_id()

返回Returns

guid 类型的值,该值标识当前记录的数据分片或空 guid(全为零)。A value of type guid that identifies the current record's data shard, or an empty guid (all zeros).

示例Example

下面的示例演示如何获取一个列表,其中包含其记录是一小时前的所有数据分片,这些记录具有列 ActivityId 的特定值。The following example shows how to get a list of all the data shards that have records from an hour ago with a specific value for the column ActivityId. 它表明,一些查询运算符(这里是 where 运算符,但对于 extendproject 也是如此)保留了有关承载记录的数据分片的信息。It demonstrates that some query operators (here, the where operator, but this is also true for extend and project) preserve the information about the data shard hosting the record.

T
| where Timestamp > ago(1h)
| where ActivityId == 'dd0595d4-183e-494e-b88e-54c52fe90e5a'
| extend eid=extent_id()
| summarize by eid

Azure Monitor 不支持此功能This capability isn't supported in Azure Monitor