WELCOME TO



1143000 Accessing Object from external HDI Container of XS Advanced application in HANA 2.0 Applies to: This article applies to the method or approach off accessing object from external HDI container of XS Advanced applications in HANA 2.0Summary: This document aims at providing a brief reference about how to access objects or HANA artifacts from another HDI container of XS Advanced(XSA) applications. HDI (HANA Deployment Infrastructure) is a service layer of the SAP HANA database that simplifies the deployment of HANA database artifacts by providing a declarative approach for defining database objects and ensuring a consistent deployment into the database. SAP HANA HDI container consists of a design-time container and a corresponding run-time container. Database schema abstracted by HDI container and should only be accessed via container. In HDI container only local objects can be accessed and foreign objects can only be accessed by synonyms. This article would provide reference about how to access such objects from the external HDI container of XSA applications. This will enable integration between projects developed by microservices based architecture. Author: Dipanshu RoyCreated on: 9th September 2018Email id:dipansro@in.00 Accessing Object from external HDI Container of XS Advanced application in HANA 2.0 Applies to: This article applies to the method or approach off accessing object from external HDI container of XS Advanced applications in HANA 2.0Summary: This document aims at providing a brief reference about how to access objects or HANA artifacts from another HDI container of XS Advanced(XSA) applications. HDI (HANA Deployment Infrastructure) is a service layer of the SAP HANA database that simplifies the deployment of HANA database artifacts by providing a declarative approach for defining database objects and ensuring a consistent deployment into the database. SAP HANA HDI container consists of a design-time container and a corresponding run-time container. Database schema abstracted by HDI container and should only be accessed via container. In HDI container only local objects can be accessed and foreign objects can only be accessed by synonyms. This article would provide reference about how to access such objects from the external HDI container of XSA applications. This will enable integration between projects developed by microservices based architecture. Author: Dipanshu RoyCreated on: 9th September 2018Email id:dipansro@in.Table of Contents TOC \o "1-3" \h \z \u BUSINESS REQUIREMENT PAGEREF _Toc522955473 \h 3OVERVIEW PAGEREF _Toc522955474 \h 3PROCESS & TOOLS USED; PAGEREF _Toc522955475 \h 3SOLUTION: PAGEREF _Toc522955476 \h 3CONCLUSION: PAGEREF _Toc522955477 \h 12REFERENCE: PAGEREF _Toc522955478 \h 12BUSINESS REQUIREMENTThere would be a requirement HANA 2.0 XSA application to access HANA objects or artifacts from one HDI container to another HDI container. This would allow project to build applications parallelly, faster and agile way. However, any real-world project would also require integration between applications and accessing or sharing objects between applications. The database artifacts in HDI containers are local objects and not visible to different project and HDI container in it. The database artifacts which are foreign objects to HDI container, however can be accessed by synonyms. The views can consume the local synonym provide access to the data resides in different HDI container, thus allow integration between applications.OVERVIEWAccessing objects and artifacts in another HDI container from XSA application requires synonyms to be created in the HDI container. One needs to follow below steps. Create target HDI container as source via adding external SAP HANA services.Create roles in target HDI container.Provide privilege to object owner and application user to the roles createdCreate synonym for the external HDI container object.Creating view to consume the synonym created for external HDI container object PROCESS & TOOLS USED;HANA 2.0 sp03 is used for this demonstration. Basic knowledge of database concept and skills are required. One should be familiar with eclipse-based tools or the HANA Web Ide as currently SAP only supports WEB Ide for developing XSA applications.One should be familiar with basic concept of Unix commands, HANA application based security, user role, SQL and HANA modeling techniques.SOLUTION:The following is the demonstration of how to achieve integration between applications created in different XS Advanced projects. The integration here demonstrated by accessing HANA table created in one HDI container from another HDI container by using synonym. The users of the container have been granted privilege which is applications based introduced in XS Advanced applications. Create target HDI container as source via adding external SAP HANA services:One need to add external SAP HANA service for consuming HDI container (projext-hdi_extdb) for the target HDI container (projdroy-hdi_droydb)The following external service entry has been added to the project descriptor file mta.yaml A demo CDS table has been created in the target HDI container(projdroy-hdi_droydb) which would be consumed from external HDI container (projext-hdi_extdb) The table has been populated with some sample records.Create roles in target HDI container: Any HDI container has two technical owners Application ownerObject ownerI have created following two roles for synonym access. The roles would be used by HDI container object owner to access table from target HDI container. Two different roles have been created to prevent unwanted schema access via the view as SAP recommends assigning different roles to the object owner and the application user. Provide privilege to object owner and application user to the roles created:The owner of the HDI container containing the synonym requires SELECT privilege on target HDI container object which is CDS table here. Creating Synonym for the DEMO_TABLE1 table in target HDI container(projdroy-hdi_droydb)The synonym DEMO_TABLE_SYN can be created through extcon.hdbsynonym file created in extdb database module.We need to choose external services so the external HDI container and the table (DEMO_TABLE1) would be visible for creating the synonym.The created synonym in database explorer pointing to external schema and the corresponding table.Creating View to consume external HDI container table via the synonym:The view EXTCONT_VIEW has been created to consume the synonym pointing to DEMO_TABLE1 table in external HDI container.The data preview in data explorer perspective of the view created based on synonym.CONCLUSION:The above approach is valid till HANA 2.0 SP03 for XS Advanced applications. The approach would benefit developers accessing external HDI container objects for seamless integration between XS advanced applications. The approach would benefit developers to integrate XS advanced application created through microservices methodology or more conventional agile methodology. REFERENCE:SAP HANA Developer Guide for XS Advanced Model ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download