Skip to Content
avatar image
Former Member

Cache HANA View

Hello Experts,

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?



Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Best Answer
    Apr 05, 2016 at 03:35 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks Lars. As you suggested, we may end up having an input/filter to only display the data up to a certain point such as month end. I know most of the data has year/month, but I have to check if all of it does. Hopefully it is doable.

      The snapshot table option would really be a pain in the neck, but I guess the best option if the first isn't doable.

      Why did you say history tables is not the right choice? Is it because these two options are easier?

  • Apr 05, 2016 at 04:07 AM

    Hi Connor,

    Please have a look at below link.

    Hope this will help you.



    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      The Cache Invalidation feature is exactly what we do not want to happen. I see the invalidation period can only go for one day. So after one day the cache will be invalidated. We want to be able to see the data for a month ago. Your link lead me to look at the HANA History capabilities but that requires me to change all the underlying tables to History tables and I'm not sure if that is a possibility at this point.

  • Apr 05, 2016 at 08:58 AM

    As I understand you want to compare weekly performance using web application. Why can't you simply filter data based on weeks or dates during the demo and after that remove filter.

    or create optional input parameter to set week or date.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks for that idea Ibrahem, we may end up filtering on month end, so that the new data for the coming month is not displayed in the view.

  • Apr 05, 2016 at 03:34 PM

    Hi Connor,

    This might not be entirely possible in views. But, you might see if 'History Tables' in HANA suit your needs,

    When I traveled through time using SAP HANA!!


    Add comment
    10|10000 characters needed characters exceeded