Forum Discussion
awman__
Sep 19, 2022Copper Contributor
KQL schedued query with cached query result
Hello, I am trying to design queries that look up data from 7d or 30d back so that they act a bit smarter. I was looking for a feature that would let me cache and refresh the data from long period ...
- Sep 20, 2022Two other options.
If it's a single query and you wish to retain data and re-use with the same KQL (know as a 'subquery') then look at https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/materializefunction
if you need to summarize data (a bit like what Microsoft does for the Usage table (which is an hourly aggregated summary of the Tables utilization and billing), you could look to do that via a logic app and a custom log which you query instead of the source Table.
GBushey
Sep 19, 2022Former Employee
You shouldn't need to worry about caching as the KQL engine is quite efficient, especially when looking at time fields. No matter what, you would not be able to look for data further back than 14 days in an analytic rule.
Clive_Watson
Sep 20, 2022Bronze Contributor
Two other options.
If it's a single query and you wish to retain data and re-use with the same KQL (know as a 'subquery') then look at https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/materializefunction
if you need to summarize data (a bit like what Microsoft does for the Usage table (which is an hourly aggregated summary of the Tables utilization and billing), you could look to do that via a logic app and a custom log which you query instead of the source Table.
If it's a single query and you wish to retain data and re-use with the same KQL (know as a 'subquery') then look at https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/materializefunction
if you need to summarize data (a bit like what Microsoft does for the Usage table (which is an hourly aggregated summary of the Tables utilization and billing), you could look to do that via a logic app and a custom log which you query instead of the source Table.