Overview of Migration of SAP HANA graphical view models into the new XSA development environment
This post gives an overview of the motivation behind migrating SAP HANA graphical view models (e.g., Attribute Views, Analytic Views, Calculation Views) into the new XSA development environment and the steps involved. For more details you can also listen to the recording of a session that was held on this topic at TechEd 2017. You can find the recording here.
Motivation for the migration to the new development environment
In the past several different development tools have been used for specific HANA development scenarios. To unify the development experience on SAP HANA a new development environment has been introduced that integrates these former separate development tools in one development environment. This environment is called SAP Web IDE for SAP HANA and runs in the XS Advanced (XSA) environment (available since SAP HANA 1.0, SPS11). The screenshot below depicts the old situation of many separate development tools and the new situation in which all these tools are integrated into SAP Web IDE.
Integration of several development tools into SAP Web IDE for SAP HANA
With the required move to XSA to run SAP Web IDE the old HANA repository and the XS classic service become obsolete. See SAP Note 2465027 for further information about the deprecation of the old development repository that was used with SAP HANA Studio. SAP Note 2396214 describes the transition process from XS classic to XSA.
In addition to the unified development experience the XSA environment also provides a more seemless transition to a Cloud installation running Cloud Foundry because basically the same deployments can be done in XSA and Cloud Foundry (see this blog for more information).
Within this new and unified Web IDE development environment the different development tools have been reimplemented. See the screenshot below for examples of various development tools in the SAP Web IDE for SAP HANA.
Mock-up that combines the various development tools available in SAP Web IDE in one screenshot
New modeling features that are only available in the new development environment
The graphical view modeler is one of these tools that have been reimplemented in the new Web IDE environment. As a consequence, new features of this tool are only made available within this new environment. See the following screenshot for an overview of the new features that are only available in SAP HANA Web IDE.
Selection of features that are only available with the graphical view modeler running in SAP Web IDE but not in SAP HANA Studio
Overview of migration steps
In order to make use of this new development environment the old modeling artefacts have to be migrated into the new HANA deployment infrastructure (HDI) that runs in the XSA environment. The neccessary steps for this migration are discussed below. Basically, the migration consists of two steps:
- Migration of old modeling artefacts to artefacts supported by HDI
- Migrating these HDI-supported artefacts into the HDI environment.
Both steps are supported by tools. Up to HANA SPS03 the two steps were run separately. Since SPS03 both steps can be combined.The following screenshot summarizes this information graphically.
Depiction of the the migration steps
The wizard for the migration to HDI-supported modeling artefacts is available in SAP HANA Studio since HANA SPS11. However, we recommend the most current Studio release to benefit from additional migration options. See screenshot below for how to start the wizard.
Migration wizard for step 1, started in SAP HANA Studio
The second migration assistant to migrate the HDI-supported artefacts into the XSA environment requires that the target system is at least on HANA 2.0. Since SPS03 this migration assistant can also cover some of the functionality of the migration wizard.
Step 1: Migration to artefacts supported by HDI
In the past three different view types were available for graphical modeling in HANA: Attribute Views, Analytic Views, and Calculation Views. With newer releases, SAP has recommended to try to replace Attribute and Analytic Views with Calculation Views. These recommended Calculation Views come in three different flavors: Dimension, Cube, and Cube with Star Join.
There were mainly three reasons for this recommendation to replace Attribute and Analytic Views with Calculation Views:
1.) clarity: In the past the type of the view e.g., Attribute View did not bear information to the intended modeling scenario. In contrast, a Calculation View with flavor “Dimension” includes this semantic information. This means developers do not have to select their view type based on tacit knowledge but can explicitly express their intention instead.
2.) unification: The conceptual differences between the views have been reflected in differences in graphical modeling in the past. With the Calculation View as the sole type for modeling these differences have been minimized providing a unified modeling experience
3.) performance: By using solely one view type additional optimizations options become possible. These optimizations will become more and more relevant with later HANA releases and require migration of Classical Analytic Privileges in addition.
Given these advantages a decision was made to only support graphical Calculation Views and SQL Analytic Privileges but not Attribute Views, Analytic Views, Classical Analytic Privileges, or script-based Calculation Views in the new development environment SAP HANA Web IDE.
Therefore, a fourth reason – to benefit from the new development environment – exists now to convert Attribute and Analytic Views to Calculation Views and to convert Classical Analytic Privileges to SQL Analytic Privileges. See screenshot below for an overview of the artefacts that are not supported in the HDI.
Types of view models that are not supported in HDI
More details about this migration process to HDI-enabled artefacts and the wizard that is available since HANA SPS11 to support the migration can be found here. Additional manual steps might be required in certain situations. Please refer to the attachment of SAP Note 2325817 for an up-to-date list of these situations. How a switch to Calculation Views can be achieved in a SAP BW environment is described in SAP Note 2236064.
Step 2: Migration of HDI-supported artefacts into XSA environment
For further details on actual migration steps of these HDI-enabled artifacts into the new development environment see the documentation mentioned in SAP Note 2362604. In particular also check the section Modeler Artifacts here for changes related to the migration.
In a nutshell the tool is called from operating system level and connects to the source system to read the specified delivery unit that contains the HDI-enabled artefacts. If the tool completes successfully the created archive can be imported into the XSA environment.
Since SPS03 this second migration assistant can also be used directly on the objects that are not supported in HDI (e.g. Attribute View and Analytic View) and will then convert these artifacts into Calculation Views first.
For more details check the recording of a session that was held on this topic at TechEd 2017. You can find the recording here.
Thanks, great summary.
However, tricky is that some SAP-Products, eg SAP (ABAP) BW, us HANA without HDI and continue to use more an more, eg a BW-BEx-Query can be exposed as a calculation view.
Have you got some ideas or even best practises how to combine these ABAP-generated non-HDI views into XSA/HDI managed views?
In principle you could include the respective _SYS_BIC views into your HDI Calculation Views (via synonyms) but I would recommend to wait till SAP BW/4HANA allows generating the exposed views directly into HDI which is planned to happen next year.
If BW/4HANA not in the Organizations roadmap. Will BW 7.5 on HANA allow to expose genetared views in HDI ?
SAP Note 2463312 - Support of HDI in combination with SAP BW (on HANA) and SAP BW/4HANA contains the current status on the support of HDI by BW. From there you can see that currently no plans exist to make it available for BW on HANA in contrast to BW/4HANA
This blog says " The second migration assistant to migrate the HDI-supported artefacts into the XSA environment requires that the target system is at least on HANA 2.0. "
So, what option do we have to migrate HDI-supported artefacts into XSA in HANA 1.0 SPS 12 ? How can I get HANA repository calculation views migrated into HDI without The second migration assistant ?
You can create HDI Calculation Views also with SPS12 with some limitations using SAP Web IDE for SAP HANA. As to the migration: in theory you could use a HANA Express Edition (https://www.sap.com/developer/topics/sap-hana-express.html) as the target to get your old repository Calculation Views migrated to HDI Calculation Views and use the migrated Calculation Views in your SPS12 HANA. Practically, however, you will face several issues because SPS12 HDI does not support all features that HANA 2.0 HDI supports, for example, in the area of star-joins or hierarchies. Thus my advise would be to only start the migration when you have a real target system of HANA 2.0.
Thankyou Jan ! One more question -
I learnt that we need to use synonms to access data from HANA database schema. So, If I have native calculation view built on top for multiple tables- will the migration tool take care of building synonyms for underlying tables or we will have to manually create all synonyms and then use migration assistant to migrate views or there is any other way ?
yes, the XS Migration Assistant will create synonyms for you. For more details, please refer to its documentation: https://help.sap.com/viewer/58d81eb4c9bc4899ba972c9fe7a1a115/
during the first step of the migration when you migrate to Calculation Views there is no need for synonyms. The Calculation Views will point to the same tables. In the second step of the migration when you use the migration assistent the synonyms will be defined and the Calculation View will use these synonyms. These synonyms will point to the respective schemas if they exist in the target system.
After migrating classic Calc views to XSA environment, what would be the impact to front end BI tools. Will BI 4.2 business objects webi reports built on top of direct Hana calc views still continue to work?
the support of Calculation Views by frontend tools after the migration will depend on the specific frontend tool used. Webi BI 4.2 currently does not support HDI Calculation Views.
When accessing the views with SQL the main difference is that you are not accessing the view in _SYS_BIC but in the respective container-schema. If there is a need to access views still in _SYS_BIC for a short transition period you could use synoynms (https://help.sap.com/viewer/4505d0bdaf4948449b7f7379d24d0f0d/2.0.02/en-US/0bf88516d12b40ee9605b9f75fae568e.html)
Is this still the case with HANA 2.0 SPS 02+ with the new EPM-MDS plugin? I heard that HDI containers now will show up in the classic http INA adapter.
You are correct that the HDI containers show up. However, Calculation View modeling is very feature rich. Therefore, in the end, it will still depend on the respective front-end-tool which features of Calculation View modeling are supported.
I have two questions around this topic.
To 1.: I cannot speak for Tableau but I do not see why there should be a fundamental difference how to access HDI and non HDI Calculation Views. Best would be to address this question to Tableau. If I understand you correctly the technical Tableau user can access the HDI views via SQL but it seems that your individual user does not have this access permissions.
To 2.: The migration assistant assumes the target system to be at least on HANA 2.0. Given that many additional features are available with higher SPS of HANA 2.0 I think migrating to HANA 2.0 should be planned.
Thank you very much for the information. I will check with Tableau on the Item#1.
If we directly access Calc.View as a source Tableau doesn't show data for HDI views. But if we go to Edit Data source and use "Generate SQL" option on the same CV, then it shows the data. This is not the case for Classic _SYS_BIC views. It seems Tableau is not able to recognize HDI views similar to standard views.
Thanks Jan - for routing this question our way!
Thank you for your question!
Tableau is currently working on supporting HDI views the same way as XS Classic views and I will keep you posted here on any updates on its release.
Thank you Jie. We spent lot of time and not sure whether it was an issue with privileges or HANA or Tableau. Please share when Tableau release the fix for this.
Sorry for any inconvenience - will for sure keep you updated!
Just wanted to keep you posted that with Tableau 2019.3 that's released this week, you should be able to connect to HDI calculation views just the same way you do with non-HDI views. Note that you will have to change the schema from the default _SYS_BIC in Tableau to the HDI container the views are deployed to.
Please don't hesitate to reach out to us if any questions!
Hi Jan, I have gone through the migration documentation, needed a clarification on Decision table migration to XSA, I understood that, Decision table is not supported in XSA. Before moving to XSA, we will need to migrate the decision table in HANA Studio and therefore procedure and table functions are created as the result. But I am unable to understand how these artifacts will be maintained after importing them in XSA, as there is NO graphical interface for decision tables.
secondly, I also read that, HANA rules framework will be the successor of decision tables in XSA, is it only for the newly created Rules objects or is there any relation to HRF during the decision table migration to XSA?
there is a more consolidated business rules framework available. See e.g., here
An XSA application is available to use them, see e.g., here
Hi Jan, thanks for the quick reply. the document links you attached here provide more about rules framework scenarios. However, before I start with Rules framework, I would like to know, what happens to Decision table objects while migrating to XSA?
decision tables need some preparation before the XSA migration. In a nutshell, you use a HANA Studio migration option. You can find the details here
Hi Jan, Sorry for extending this conversation.,but I could not find a way out on this. I have gone through the documentation link which you provided, I am able to run migration in HANA studio for the decision table and it generated a procedure and table function as shown in my above screen shot. But I could not find info on what is the next step?
I tried to run the migration assistant for this newly created objects for DT, then imported them into XSA project in Web IDE, but decision table is not migrated since it is not supported. So how do I make my new rules inserted or updated in XSA going forward?
it seems like the way forward is to use SAP Cloud Platform Business Rules. You can find more information about it in this blog.
If you have further questions on decision tables / SAP Cloud Platform Busniess Rules, it might be best if you ask your questions directly there as this blog here is about graphical view migration.
Hi Jan, I am testing the behavior of CV migration on HXE, noticed that, while performing migration of a CV, external service and synonym files are generated only for the tables used in Current CV., if my current CV is using any other master data CVs and they are not part of the current migration package, then migration is completed but there are errors in the log.
in this case, how do I get this CV migrated to .hdbcalculationview format? if this is not possible, I will have to include all the nested CVs in one package used for migration? please let me know.
optimally, you would indeed migrate all dependend views in one step so that you do not need to mix old and new world. In larger projects this is probably unrealistic though. You could do a staged migration and use option [--generate-providers].
Thanks Jan, I have gone through staged migration, that makes sense.
I have a question about migration. What happens to the old CV in XSC after migration? Do they still exist and can be used after migration just like before. In most of the blogs i have read, the migration tool generates a .zip file which will be imported in WebIDE and basically in XSA you create a new CV with a new extension “.hdbcalculationview”.
what happens to your old views after migration depends on the migration strategy that you are using.
Generally speaking there are two logical steps in the migration:
a) migrating repository artifacts to artifact types that are supported by HDI (e.g. Attribute View to Calculation View)
b) creating XSA projects with HDI artifacts
You can achieve step a) with the migration wizard of HANA Studio and then proceed to step b) with XSA migration assistant, or you can do both steps with XSA migration assistant (since SPS03).
If you use the XSA migration assistant a zip file can be generated that you import in Web IDE. After deploying the artifacts they will live in parallel. You will have e.g. a view CV1 in schema _SYS_BIC (the old one) and you will have a new one in a schema that you chose, e.g., APP1.CV1
If you use HANA Studio for step a) there is an option to select "Copy and migrate". If you select it, the original views will not be modified instead the migrated ones will be created in another location of your content. Without selecting it, your views would be overwritten.
After the migration the views are decoupled. This means technically speaking you can have the old-repository and HDI version in the same system but practically you would need to make sure changes are applied to both views so that they are kept consistent. Therefore, I think the critical decision will be at what point in time the HDI view will be the leading view. For example, you could do a migration, get used to working in Web IDE while you keep the old repository view as the leading one, and only then decide about another migration so that the Web IDE is becoming the leading version.