When I run query
View best response
Before actually AzureDiagnostics table to appear in Log Analytics you need to forward such logs from one of the Azure Services that have such. Just for reference here is all the services that support such logs:
For some services you can forward the logs via Azure Portal for others you will have to use PowerShell, CLI or ARM. Specifically for Azure Automation see here how these are forwarded to Log Analytics:
After configuring that setting and you have a new job started/running you will start to see the logs in Log Analytics.