Consume Space Objects in Your HDI Container

To consume SAP Datasphere views that are exposed for consumption as sources for your calculation views and flowgraphs, you must create a database user with appropriate privileges, create a user-provided service in SAP BTP Cockpit, and configure your HDI project.

Prerequisites

To consume space objects in your HDI container:
  • Add the HDI to your space (see Add an HDI Container and Access its Objects in Your Space).

  • Have access to a database user with the following privileges: Enable Read Access (SQL), Enable Write Access (SQL, DDL, DML) and Enable HDI Consumption (see Create a Database User).

  • The space administrator must copy the credentials from the HDI Consumption section of the Database User Details dialog (accessible by clicking the button for your database user in the Database Users area of the space page) and provide them to you.

Context

Procedure

  1. Go to the SAP BTP Cockpit, open Service Instances, and use the copied credentials to create a user-provided service instance, which will provide the connection between SAP BTP Cockpit and your SAP Datasphere tenant.

    See Creating User-Provided Service Instances in Cloud Foundry Environment in the SAP Service Manager documentation.

  2. In your SAP Business Application Studio project, do the following:
    • Prepare your project for building, including specifying the name of your user-provided service instance in your mta.yaml file (see Prepare Your HDI Project for Exchanging Data with Your Space).

    • Create an hdbgrants file to grant read access to the views that you want to consume from your SAP Datasphere space.

      You can, optionally, grant access to the Application Function Library by including the following code in hdbgrants:
              	"global_roles" : [
                  	{
                      	"roles" : [ "AFL__SYS_AFL_AFLPAL_EXECUTE_WITH_GRANT_OPTION"]
                  	}
              	]			
      
    • Create hdbsynonym and hdbsynonymconfig files to define synonyms for the consumable views.

  3. Build your project.