Cache HANA View
I had a unique customer question the other day and I am not sure if it can be done or the best approach to take. Any advice would be much appreciated.
Background: The customer has built a development web application which uses multiple HANA views to display different reports used by management. The views are built on tables which are updated daily.
Problem: While demoing the reports from week to week to management they want to be able to display the same output on their application even if the underlying data had been changed. So basically they want to be able to cache all the view outputs from today and display them weeks from now, even though the underlying data changes. I have read about Caching in HANA and I believe its purpose to be for more for enhancing query execution time for complex querries rather than taking snapshots of the views. After the demo period is over they won't have a need for this and will go back to their live views.
Any ideas on what can be done here?
Lars Breddemann replied
You're confusing cache with snapshots.
Your customer wants to see snapshots of data.
That can be implemented in different ways - caching is not one of them.
History tables would also not be the right choice here.
Most likely you'd need to implement some form of as-of reporting parameter in the models, so that only data relevant to the reporting period is considered.
The other, more rigid but also less flexible version, would be to actually store the results of the calculation views in a snapshot table and report off of that, if required.