In any HANA system, as requirements grow more complex, the HANA views start getting complex as well. This leads us down a slippery slope where, to drive adoption we need more rules and coding in more rules make the views even more complex, affecting performance and ultimately, adoption. In this blog, let us see how using Flow Graphs in HANA can help in such situations.
Performance issues are common when complicated HANA calculation models are consumed through live data connections in BOBJ tools or SAP Analytics Cloud. For instance in BOBJ, when a filter is applied to the story or if data needs to be refreshed, the live connection executes all the joins and calculations in the calculation view, to load the data.
One easy way to solve this problem is to persist data from the calculation model in an object and consume this persisted data in BOBJ / Analytics tool of choice. This can improve performance tremendously. In a landscape where we have HANA as the database with Smart Data Integration (SDI), tables are the only objects that can store data. To persist a calculation view in a persisted table in HANA, we can either write a procedure or use a Flow Graph.
A flow graph is usually considered an operator which helps transform data from a remote source into SAP HANA either in batch or real-time mode.
But, a flow graph can also be used to input data from a calculation model to a template table. It can also be easily scheduled. By doing this, the calculation model output can be persisted without writing any code and the inbuilt HANA functions can take care of the rest.
Steps to Persist Calculation Model Output using Flow Graphs in HANA
- In Web IDE, right click on a package
- Click on New -> Flow Graph. Give a name for the Flow Graph
3. Select Data Source from the left and drop it in the Content area of the Flow Graph
4. Select a Calculation View
5. Now select Template Table from the left and drop it in the Content of the Flow Graph
6. Connect the Data Source and the Template Table
7. Double click on the Template Table to change the Output Table name and Schema, as required
8. Save the Flow Graph and click on the Execute button to load data
9. The Flow Graph can also be scheduled to perform batch load
Learn more about Visual BI’s SAP HANA Offerings here.