Forum Discussion

GouravIN's avatar
GouravIN
Brass Contributor
Nov 15, 2018
Solved

Parse ; value from output

Hi All,   I am creating a backup report using Log Analytics. But unfortunately I am not able to parse two column for my report and need help.   The original column  looks like    BackupItemUniq...
  • Stanislav_Zhelyazkov's avatar
    Nov 16, 2018

    You can also use split in that situation:

    AzureDiagnostics
    | where TimeGenerated > ago(1d)
    | where Category == "AzureBackupReport"
    | where OperationName == "Job"
    | extend x = split(ResourceId, '/')[-1]
    | extend y = split(BackupItemUniqueId_s, ';')[-1]
    | project TimeGenerated,  BackupItemUniqueId_s, ResourceId, ResourceGroup, Level, x, y

    This will split the fields by character and return the last value of the split.

Resources