I am trying to build a KUSTO query to verify that logs are coming to Azure log analytic tables or not. This is my code. This command work perfectly & give number of records it received. But Issue is it does not consider in the query output the table names that received zero(not any) logs
union withsource=sourceTable kind=outer Table1, Table2, Table3
| summarize AggregatedValue=count() by bin(TimeGenerated, 5m), sourceTable
Expected output:
| Table Name | Count |
----------------------
| Table1 | 5 |
| Table2 | 3 |
| Table3 | 0 | //If the count is zero, query output does not show the table name
----------------------
You didn't specify the values in the column for
bin(TimeGenerated, 5m)
in your expected output. I assume you didn't really want this column there (otherwise, I'm not sure what exactly you wish to see in the expected output for Table3, which has 0 records).To get the output you want, use the following trick: