Forum Discussion
Vino55
Microsoft
Feb 19, 2019Getting Failed to resolve scalar expression. How to create column for null fields sent from our RP?
Hi,
When we ingest data from our RP to LA, there are some fields and we explicitly set null values.
This is not for all scenarios. In other scenario, string values will be filled for those co...
- Feb 20, 2019
Hi,
You can do this
AzureDiagnostics | where TimeGenerated >= ago(90d) | project columnifexists("RecoveryJobDestination_s",'defaultValue')From the example you can see how it will be for the other columns as well. The operator documentation
Feb 20, 2019
Hi,
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?
Vino55
Microsoft
Feb 20, 2019Hi Stanislav_Zhelyazkov ,
Thanks for the response.
This is the query:
AzureDiagnostics | 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
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
Could you please tell me how to handle this? When I query for these fields, I need to get null (if not present) and
corresponding values (if present).
Thanks.
- Feb 20, 2019
Hi,
You can do this
AzureDiagnostics | where TimeGenerated >= ago(90d) | project columnifexists("RecoveryJobDestination_s",'defaultValue')From the example you can see how it will be for the other columns as well. The operator documentation