cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Script to create views

Former Member
0 Likes
551

How to create the views (attribute, analytic, calculation) using scripts rather than following the HANA studio?

This will help in automating this steps involved and increase productivity, especially while migration the application from another database.

View Entire Topic
richard_bremer
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Rahul,

in the SQL Script Guide for HANA (development section on https://help.sap.com/hana_appliance) you find multiple examples of creating SQL Script Procedures or Calculation Views (SQL Script Procedures with result view) programmatically, i.e. via SQL calls and not via the modeler add-on to SAP HANA Studio.

As for Attribute Views and Analytic Views, there is no public API available in order to generate them. In principle, one can generate Analytic Views via SQL and you can find something out by running activation in SAP HANA Studio and carefully analyzing the activation logs - however, I don't want to recommend this, as it will not be supported by SAP. You can also look at the export of data models and easily find out how to generate that XML (again without API support), but also here we may change the layout of these exports and SAP will not support this.

So the answer is: Calculation Views you can easily generate via SQL and thus programmatically. Analytic Views can basically not be generated programmatically.

Best regards,

Richard

--

Dr. Richard Bremer

Customer Solution Adoption (CSA), SAP AG