Wednesday, 21 February 2024

SAP Datasphere – Enable SAP HANA Development Infrastructure (HDI)

Introduction


Use SAP SQL Data Warehousing to build calculation views and other SAP HANA Cloud HDI objects directly in SAP Datasphere run-time database and then exchange data between HDI containers and SAP Datasphere spaces. SAP SQL Data Warehousing can be used to bring existing HDI objects into  SAP Datasphere environment, and to allow users familiar with the HDI tools to leverage advanced SAP HANA Cloud features.

1. Gather the relevant information


To Enable HDI container on DWC in SAP Datasphere User must require below details:

  • SAP Datasphere Tenant ID
  • SAP Business Technology Platform Org GUID
  • SAP Business Technology Platform Space GUID

Follow below Procedure to collect above details 

  • To collect the SAP Datasphere Tenant ID user should be part of any one of this roles DW Administrator, System Owner
    • Go to Expand Navigation bar ==>System==> About==> Tenant
SAP Datasphere – Enable SAP HANA Development Infrastructure (HDI)

SAP Datasphere – Enable SAP HANA Development Infrastructure (HDI)

◉ To collect the SAP Datasphere Tenant ID & Space GUID user should be part of any one of this roles SAP HANA Cloud Administrator, Space Developer

    ◉ Go to SAP BTP Cockpit==>Global account==>Subaccount==>SAP Datasphere Space

SAP Datasphere – Enable SAP HANA Development Infrastructure (HDI)

2.Create SAP Support ticket to mapping/sharing DWC HANA Cloud to SAP Datasphere tenant space


Create a Request to Product team under DS_SM category along with below details:

◉ SAP Datasphere Tenant ID :
◉ SAP Business Technology Platform Org GUID :
◉ SAP Business Technology Platform Space GUID:

In the Schema Access area, go to HDI Containers and click Enable Access. A pop-up window appears there is need to open a support ticket so Product team can map the HDI containers with SAP Datasphere space. Please add the above-mentioned details into that ticket.

Notification will be shared once the ticket has been Processed/Mapping is completed.

3.Create a HDI service instance on SAP Cloud Platform (SCP) under SAP Datasphere space


To create HDI Service instance on SCP user should be part of any one of this roles SAP HANA Cloud Administrator, Space Developer

◉ Go to SAP BTP Cockpit==>Global account==>Subaccount==>SAP Datasphere Space
◉ Under Instances Tab Click on Create button by selecting service instance type .
◉ Select the service type as an SAP HANA Schemas & HDI Containers & Plan is hdi-shared & Instance Name is name (ex: DSP_HDI_PLAY) of  HDI Container. Click on NEXT and add here Schema name with JSON format (ex: {"schema":"DSP_HDI_PLAY"}) . This is how User can define HDI Container own Schema name again this is not an mandatory to add here Schema name if left with blank this field then that schema name will  autogenerated number format one. Click NEXT and Click Create.

Now HDI Container getting creating like below with staring of the status

SAP Datasphere – Enable SAP HANA Development Infrastructure (HDI)

SAP Datasphere – Enable SAP HANA Development Infrastructure (HDI)

With this status now have successfully created HDI Container.

4. Create roles on HDI container by using HANA Web IDE


Create the required roles to allow SAP Datasphere to read from and, optionally, write to the container.

Must define the roles DWC_CONSUMPTION_ROLE and DWC_CONSUMPTION_ROLE# (with grant option) in the container to allow to add into DSP space and allow to exchange data between the container and the space. 

◉ To Create this roles on HDI Container  user should be part of this roles Business_Application_Studio_Developer on BTP Subaccount & Space Developer on BTP space.
◉ Login tot the Business Application Studio (BAS) and create Dev Space by selecting SAP HANA Native Application.

SAP Datasphere – Enable SAP HANA Development Infrastructure (HDI)

◉ Open Dev Workspace and Create one SAP HANA Database project
◉ Click on New Project from Template and select Create SAP HANA Database project click start.

SAP Datasphere – Enable SAP HANA Development Infrastructure (HDI)

◉ Enter the project name (ex: TEST) and SAP HANA Database Version should be an SAP HANA CLOUD
◉ Login to CF account by using credentials authentication method (By entering SAP Email and SAP Global Password) and then click Sign in

SAP Datasphere – Enable SAP HANA Development Infrastructure (HDI)

◉ Select the CF target details Subaccount/organization and CF space

SAP Datasphere – Enable SAP HANA Development Infrastructure (HDI)

◉ And then Bind to HDI Container Service like below

SAP Datasphere – Enable SAP HANA Development Infrastructure (HDI)

◉ Click on Finish Button and with this step User have successfully created SAP HANA Database Project.

Can also verify either User have connected to correct HDI container or not by checking the service key on HDI container.

Once Project get created it will also generate and Create one service key "SharedDevKey" for the Cloud Foundry service instance "<HDI Container_name>"

◉ Create a DWC_CONSUMPTION_ROLE and DWC_CONSUMPTION_ROLE# roles under this Project on BAS.
◉ Under db==>src folder User will have to create above two roles like below

Role Name -1

DWC_CONSUMPTION_ROLE_WITH_GRANT.hdbrole

SAP Datasphere – Enable SAP HANA Development Infrastructure (HDI)

{    "role": {"name": "DWC_CONSUMPTION_ROLE#",
               "schema_privileges": [{"privileges_with_grant_option":[ "SELECT","SELECT METADATA","EXECUTE" ]}]}}
 
Role Name -2

DWC_CONSUMPTION_ROLE.hdbrole

SAP Datasphere – Enable SAP HANA Development Infrastructure (HDI)

{    "role": {"name": "DWC_CONSUMPTION_ROLE",
              "schema_privileges": [{"privileges":[ "SELECT","SELECT METADATA","EXECUTE" ]}]}}
 
Add HDI container info into mta.yaml file:

SAP Datasphere – Enable SAP HANA Development Infrastructure (HDI)

And then try deploy this into Database connection like below

Under SAP HANA PROJECTS folder see all the files and then click on bind icon on project folder like below

SAP Datasphere – Enable SAP HANA Development Infrastructure (HDI)

Make succeeded (0 warnings): 2 files deployed (effective 2), 0 files undeployed (effective 0), 0 dependent files redeployed.  Making... ok (0s 303ms)

With this now have successfully created roles into HDI Container.

5. Add/Deploy HDI Container instance into SAP Datasphere


To Deploy the HDI Container into SAP Datasphere Space user should be part of any one of this roles DW Administrator, System Owner, Space Owner

◉ Go to Expand Navigation bar ==>Space management==> <Select the space>==> Database Access ==>HDI Containers

SAP Datasphere – Enable SAP HANA Development Infrastructure (HDI)

Select the HDI Container by click on +

Deploy the space by Click on Deploy button.

If deployment went successful then HDI container successfully added into SAP Datasphere space.

To verify this HDI container is deployed successfully or not check/test this HDI container is appearing under Data Builder application

SAP Datasphere – Enable SAP HANA Development Infrastructure (HDI)

No comments:

Post a Comment