Forum Discussion
Getting error 'unknown function'
Hi,
I think the correct way is to have this query:
AzureDiagnostics | where Category == "AzureBackupReport" and OperationName == "BackupItemAssociation" | project BackupItemUniqueId_s , BackupItemSourceSize_s , TimeGenerated | where TimeGenerated >= ago(90d)
Save this query as function. For example you can name the function BIA.
After that in Logs blade you just execute BIA just like it is table.
BIA
- Vino55Feb 21, 2019
Microsoft
I have done exactly the same. But getting error - Body of the callable expression cannot be empty.
I tried both BIA and BIA().Please look at the attached image.
But when I click the saved function, then it displays the function code.
- Feb 21, 2019
Hi,
I am pretty sure that you are not doing the same steps. Here are some detailed steps.
You create the function like this:
Do not use let operator. When executed the query should produce results (in my case I do not have the data but in your case you should). and save it as it is.
After that you can execute the function. Notice that intellisense now even recognize it.
Once executed the same results will be produced. For me the same error is produced as I do not have that data.