Toguid

toguid

The toguid function converts its argument to a GUID (Globally Unique Identifier) value.

Spec

toguid(arg0)

Parameters

arg0 - The value to convert to GUID. Typically a string in GUID format.

Return Value

A GUID value.

Example

Convert string to GUID:

datatable(s:string)["b2e1975b-677c-4ac6-a0ed-e63acb67ff09"]
| extend guid_val = toguid(s)
sguid_val
b2e1975b-677c-4ac6-a0ed-e63acb67ff09b2e1975b-677c-4ac6-a0ed-e63acb67ff09

toguid

Converts an expression to a GUID.

Syntax

toguid(Expression)

Examples

Normalize IDs:

datatable(x:string)["00000000-0000-0000-0000-000000000000"]
| extend id = toguid(x)