If that is the behavior of the API I do not think there is a way to avoid the behavior. Nevertheless can you share actually the query you use? Many things can be achieved with the query language but without knowing exactly what you use and trying to achieve it is hard to answer the question. Also those columns that you input and different what type they are string, integer, etc?
| where Category == "AzureBackupReport" and OperationName == "Job"
| where TimeGenerated >= ago(90d)
| project JobUniqueId_g, JobOperation_s, JobStatus_s, JobFailureCode_s, JobStartDateTime_s, JobDurationInSecs_s, JobOperationSubType_s, TimeGenerated //, RecoveryJobDestination_s, RecoveryJobRPDateTime_s, RecoveryJobRPLocation_s, RecoveryLocationType_s
If I uncomment the last line, I will get error and it is obvious. Those columns were not created. Columns RecoveryJobDestination_s, RecoveryJobRPDateTime_s, RecoveryJobRPLocation_s, RecoveryLocationType_s are not created although our RP send these fields as null. But it wont be null in all scenarios. In Restore job scenarios, these fields
will be having string values. Since such operation is quite rare and I don't have those jobs triggered in my setup, these
fields are not created.
Could you please tell me how to handle this? When I query for these fields, I need to get null (if not present) and