Forum Discussion

sochan1900's avatar
sochan1900
Copper Contributor
Apr 10, 2019

Kusto Query all backup jobs and list the friendly name

I use below query which will query the failed and completed jobs and list there 

BackupItemFriendlyName_s, JobStatus_s and some other fields. However it doesnt display BackupItemFriendlyName_s for all the items for some reason... what could be wrong with the query ?
  • GouravIN's avatar
    GouravIN
    Brass Contributor

    Could you please check with this one

     

    let Events = AzureDiagnostics | where Category == "AzureBackupReport"; Events | where OperationName == "Job" | project BackupItemUniqueId_s , JobStatus_s, Resource | join kind=inner (Events | where OperationName == "BackupItem" | distinct BackupItemUniqueId_s, BackupItemFriendlyName_s | project BackupItemUniqueId_s, BackupItemFriendlyName_s ) on BackupItemUniqueId_s | project BackupItemFriendlyName_s , JobStatus_s

  • Jason Eales's avatar
    Jason Eales
    Copper Contributor

    sochan1900Hi

     

    It might have something to do with your LeftOuter Join kind ("join kind=leftouter")

     

    From what I know it means that if nothing is found on the right table join then a nothing is put in place.

     

    leftouter In addition to the inner matches, the results include a record for every record on the left table, even if it has no match. In that case, the unmatched output cells contain nulls. In the given example, 3 records on the left ("exceptions") table don't have a match on the right ("requests") table, and therefore have an empty "avg_dur" column.

     

    This site would explain it better :)

     

    https://docs-analytics-eus.azurewebsites.net/learn/tutorial_joins.html

Resources