If you’re not living behind some red moon and you’re reading this blog, you will likely be aware that SAP HANA SPS 10 had just been released.
With it also the SAP HANA Studio had been improved and extended.
Since I personally like eye-candy and enjoy exploring new features when they come with a button to click, I have installed the new version on my laptop and played with it; against a SPS 9 SAP HANA database!
That’s right – everything I describe here works just well on a Rev. 96, which means you can use these features even without upgrading your server.
(This is one of the benefits of the de-coupling of SAP HANA Studio releases and SAP HANA Server releases – indicated by the different version numbers.)
So here we go with the nice things I found in SAP HANA Studio 2.1.4.
Drop and drop of design time objects
Since basically ever I wished I could just drag and drop information models into the SQL editor so that I could execute SELECT statements against them.
No idea what took the dev-colleagues so long, but now that’s actually possible.
Simply dragging the design time object (you know, the object as it appears under the Content folder) over into the SQL editor and the corresponding runtime object name (yes, the _SYS_BIC.”<package_name>… <object_name>”) is placed right at your cursor.
Alternatively, there is a context menu entry “Copy Column View Name” that puts the name into the clipboard.
SELECT statement generation incl. input parameters
Similar to the above, you might have stumbled over models with input parameters.
The usual workaround to use the SQL generated by the data preview is alright, but a bit clumsy.
With SAP HANA Studio 2.1.4 you can now simply right-click and select “Generate Select SQL“.
After a few moments of checking the metadata, you get a new SQL editor with the basic SELECT SQL:
As you can tell, someone automatically pressed the “Format” button as well.
Compare two plans in PlanViz
More than once I got the question on how to perform comparisons between two PlanViz traces and the usual answer had to be: you put the two PlanViz editors next to each other and compare the Plan OPerator boxes one by one. This is of course tedious.
Now, there is the (once again – anyone remember Show me the timelines, baby! ? 😉 ) well hidden feature to compare two plans.
I found it in the context menu of an executed PlanViz by clicking on “Compare With Another Plan…” – not sure if there is another way to this feature.
Next you’re greeted by a little selection dialogue window, that I found rather self-explanatory:
Seems to be straight forward – so I selected one of the other open PlanViz displays by clicking “Other visualized plan“.
DISCLA(I)MER: for the next step, you should have a wide monitor. Or two monitors. Wide ones. Really! (It’s better for you anyhow, if you use it right.)
See? I told you so!
As I haven’t really worked with the feature there’s little I can report beyond that it’s there.
Go play around yourself!
In my books, this feature really is:
Immediate execution for PlanViz
Alright, you have your SQL statement. You want the PlanViz for it.
Up to now you were always confronted with some “Prepare” step and a graphical version of the Explain Plan.
“How useful…not!” you might have thought (so did I most of the times 😉 ).
No more of that!
Modern days SAP HANA Studio comes with this shortcut in the context menu:
Identify plan operations in PlanViz by name
Ok, the following is not actually a new feature, but I have just found this and decided to put it in this anyhow.
A major difficulty in analysing PlanViz outputs often is to map the model design to the actual execution.
This is inherent to the calculation view instantiation process but you can make it a bit easier for you by naming the nodes in your model with your own names.
To understand what I mean, just look at those two models, that do pretty much the same thing:
At this point there is already a benefit as the intended function for the nodes is much clearer.
Now, when the model gets executed and a PlanViz is created, we can find those node names in several places:
1. In the POP node details:
2. In the “Tables Used” list:
3. In the “Operator List”:
You will still find a lot of things that you cannot easily match back to the model, but with the custom node names, you should be able to find some anchors in the PlanViz.
Not sure about you, but I think that’s Nice!.
Comments in information models
One of the things you wish you had when working with complex models, that you or someone else created a while ago typically is: a documentation.
- Why, just why is this condition there?
- What exactly is the idea behind this calculated column?
- Where should this data go?
Wish no more!
With the SPS 10 SAP HANA Studio you can now add comments/notes to virtually anything in the model.
Click the little “Maintain Comment” button in the model, when hovering over a node…
… then enter some amazingly useful comments!
Once you close the comments editor you’ll see a little indicator at the node-icon to show that there’s a note for you:
Let’s say it together:
Data Lineage in Modeler
When working with the modeler it can get quite difficult to understand where the data of a certain output column actually comes from.
To help with that, there is now the Data Lineage feature available.
The red borders around the model nodes indicate that the data is “touched in there” and the little annotation boxes show you the column name per node.
Alright, given that I only had a few hours to look into it, I’m personally quite happy about the result here.
Seven “NICE” for the current major release of SAP HANA Studio (and there are more, like the on-demand loading of the Contents sub-folders, but I couldn’t really capture this with a screen shot 😀 ).
There you go – now you know!