Web Based Hana VDM Explore
When we use Hana Studio to view an complex VDM, we often meet following challenges:
- We are very interested in the calculated columns, but we don’t know which nodes have the calculated columns. We need open one by one to check
- We want to know how one column coming from: whether rename from a to b then to c, or be calculated from several other columns. In Hana Studo, we need open the node one by one, then manually check the columns part, then remember the relationship.
- Some calculated column is very complex, the if/then/else nested for so many level, it is very hard to understand the complex expression
- One VDM call other VDM, we need open the related VDM one by one. We can’t jump from one VDM to other VDM easily
- Lack the overall information. For example, we want to know how several column mapping from the related VDM or tables
- Sometime the Hana Studio is so slow. We need connect to HANA Server to see the VDM
In order to solve those challenges, recently I developed a Web Based Hana VDM Explore using SAPUI5. ( As currently the HANA Web-Based Development Workbench don’t support display the VDM in graphic, detail see What´s New? SAP HANA SPS 07 Web-based Development Workbench )
How to use:
Just open this url in IE9 or Chrome: (user name/password: anzeiger/display ) (Only work inside SAP, if use interested outside sap, i can provide outside access later) https://ldciuxd.wdf.sap.corp:44329/sap/bc/ui5_ui5/sap/VdmExplore/index.html?sap-client=902
how to run it locally:
Download the attachment from end of this blog and extract it to you computer ( as now it can’t directly upload the zip file, so after you extract it, please change the name from VdmExplore.zip.txt to VdmExplore.zip and extract it again), double click ‘index-local.html‘ to run it.
It include 3 VDMs just for show case. You can press the ‘Load Files…’ button to load your VDM file ( one time can load multiple files), and press ‘Add Package’ or ‘Del’ to manage the package.
How to save VDM into your local computer:
There are 3 solutions:
- In hana studio, click the ‘Repository’ tab, select the package, then right click mouse to ‘check out’, then it will save to local computer
- In hana studio open the VDM, choose the ‘Display Repository XML’ in the right top, then save it as local file ( like following snapshot)
- Use the Hana Web-Based IDE, click the VDM file, it will display the xml content, select all, then save to computer.
There are three main parts in the main screen ( the layout similar as the Hana Studio main screen):
Hana Package Part:
User can add package by press ‘Add Package‘ button, and load the VDMs from file by press ‘Load Files…‘ Just click one VDM to show detail information in the left part.
VDM Node Part:
This part shows the VDM as an tree. Click one node to show the detail information in the ‘Node Detail Part’
Node Detail Information Part:
This part shows the detail information about one node. For the topmost Semantic node, it will show the depended Tables and VDMs and the Input parameter/Variables. For the other node, show the calculated column and normal columns.
VDM Semantic Overall information
Just choose the topmost semantic node, the overall VDM information will show like following picture: the depended VDM (just click to open), tables and input parameters.
Input Parameter Information:
How to track the column path ?
We often want to know how a column coming from other nodes. Just select that column and press ‘Track Path‘, then it will high light the nodes which have relationship with this column. Just like the above picture, it will mark the node use red block and show the detail in text: rename from A to B, or … Press ‘Clear Track‘ to clear the tracking mark.
Show the calculated column in formatted style
In Hana Studio, we need click one calculated column to show the detail information. With this tool all the calculated column display in a table in the formatted style. Further more, user can easily know which node have the calculated column / filter by just check the node icon. With the C in left top corner means have the calculated column, with the F in the left bottom corner means have the filter expression
Display complex expression in friendly way
In hana Studio, it is very difficult to understand some complex nested if expression. Just like following real example for the net due data, it nearly 2000 char, it is a nightmare to understand the logic
With this tool, the life became easy. It format it like following. So no matter how many levels it nested, it is very easy to understand. ( So we can easily know that this complex expression is not optimized well….)
View the VDM in an overall and compact way
Sometimes we want to know how several columns coming from (from other VDM, Table, or nodes) in an overall view. In Hana Studio we need click the node one by one and remember them. With this tool, we can: just select the columns you interested in, and click ‘Advance Analyze‘, then it will open a new windows to show the relationship in a tree table.
Unit Test support (coming soon)
When we do unit test use the SAP hana unit test framework, we have so many tiring work: replace the depended vdm/table with private vdm/tables, provide some sample data, comparing the result. As we have all the information for the VDM, so we can provide GUI interface to help user easily do the unit test.
This tool only support ‘explore’ the VDM in read-only mode, so it can display some information in a user friendly way. It target at help to understand the complex VDM.
I build it use SAPUI5 recently, nearly 5000 line of source code. If found any bug, please drop a mail to me.