Home

Kusto Query all backup jobs and list the friendly name

%3CLINGO-SUB%20id%3D%22lingo-sub-425275%22%20slang%3D%22en-US%22%3EKusto%20Query%20all%20backup%20jobs%20and%20list%20the%20friendly%20name%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-425275%22%20slang%3D%22en-US%22%3E%3CP%3EI%20use%20below%20query%20which%20will%20query%20the%20failed%20and%20completed%20jobs%20and%20list%20there%26nbsp%3B%3C%2FP%3E%3CDIV%3E%3CSPAN%3E%3CSPAN%3EBackupItemFriendlyName_s%2C%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3EJobStatus_s%20and%20some%20other%20fields.%20However%20it%20doesnt%20display%26nbsp%3B%3CSPAN%3EBackupItemFriendlyName_s%20for%20all%20the%20items%20for%20some%20reason...%20what%20could%20be%20wrong%20with%20the%20query%20%3F%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-425275%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Log%20Analytics%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EQuery%20Language%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-432806%22%20slang%3D%22en-US%22%3ERe%3A%20Kusto%20Query%20all%20backup%20jobs%20and%20list%20the%20friendly%20name%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-432806%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F318355%22%20target%3D%22_blank%22%3E%40sochan1900%3C%2FA%3EHi%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20might%20have%20something%20to%20do%20with%20your%20LeftOuter%20Join%20kind%20(%22join%20kind%3Dleftouter%22)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFrom%20what%20I%20know%20it%20means%20that%20if%20nothing%20is%20found%20on%20the%20right%20table%20join%20then%20a%20nothing%20is%20put%20in%20place.%3C%2FP%3E%3CBLOCKQUOTE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3Eleftouter%20In%20addition%20to%20the%20inner%20matches%2C%20the%20results%20include%20a%20record%20for%20every%20record%20on%20the%20left%20table%2C%20even%20if%20it%20has%20no%20match.%20In%20that%20case%2C%20the%20unmatched%20output%20cells%20contain%20nulls.%20In%20the%20given%20example%2C%203%20records%20on%20the%20left%20(%22exceptions%22)%20table%20don't%20have%20a%20match%20on%20the%20right%20(%22requests%22)%20table%2C%20and%20therefore%20have%20an%20empty%20%22avg_dur%22%20column.%20%3C%2FSPAN%3E%3C%2FP%3E%3C%2FBLOCKQUOTE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20site%20would%20explain%20it%20better%20%3A)%3C%2Fimg%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20title%3D%22https%3A%2F%2Fdocs-analytics-eus.azurewebsites.net%2Flearn%2Ftutorial_joins.html%22%20href%3D%22https%3A%2F%2Fdocs-analytics-eus.azurewebsites.net%2Flearn%2Ftutorial_joins.html%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CFONT%3Ehttps%3A%2F%2Fdocs-analytics-eus.azurewebsites.net%2Flearn%2Ftutorial_joins.html%3C%2FFONT%3E%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-451209%22%20slang%3D%22en-US%22%3ERe%3A%20Kusto%20Query%20all%20backup%20jobs%20and%20list%20the%20friendly%20name%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-451209%22%20slang%3D%22en-US%22%3E%3CP%3ECould%20you%20please%20check%20with%20this%20one%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Elet%20Events%20%3D%20AzureDiagnostics%20%7C%20where%20Category%20%3D%3D%20%22AzureBackupReport%22%3B%20Events%20%7C%20where%20OperationName%20%3D%3D%20%22Job%22%20%7C%20project%20BackupItemUniqueId_s%20%2C%20JobStatus_s%2C%20Resource%20%7C%20join%20kind%3Dinner%20(Events%20%7C%20where%20OperationName%20%3D%3D%20%22BackupItem%22%20%7C%20distinct%20BackupItemUniqueId_s%2C%20BackupItemFriendlyName_s%20%7C%20project%20BackupItemUniqueId_s%2C%20BackupItemFriendlyName_s%20)%20on%20BackupItemUniqueId_s%20%7C%20project%20BackupItemFriendlyName_s%20%2C%20JobStatus_s%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
sochan1900
Occasional Visitor

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 ?
2 Replies

@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

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

Related Conversations
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
35 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
29 Replies