Creating a Project

Objective

After completing this lesson, you will be able to create a modeling project in SAP Business Application Studio

Database Project

SAP HANA Cloud provides templates for different types of projects. In the context of modeling, we usually use the template for an SAP HANA Database Project.

Use the template wizard to create your project. During the creation steps, you'll be prompted to choose various settings. HDB module can define a local persistence (a persistence layer that is defined and deployed in the application itself). When you build a virtual data model based on calculation views – even if the source data is stored outside of the application – the HDB module contains the database artifacts that define this virtual data model.

When you create a new HDB module, you must provide a number of properties for the module. Most of these properties are stored in the descriptor file of the application: (mta.yaml), except for a few. In particular, the namespace property of the module isn't stored in the descriptor file but is materialized by the .hdinamespace file located in the src folder.

Key Settings of an HDB Module

SettingDescriptionExample
Project NameThe name of the projectsales_analytics_project
Module NameThe name of the module. It should be unique within the entire descriptor file (mta.yaml).core-database-module
Typehdb is the reserved module type for an HDB module.hdb
PathThe relative location of the module root within the file structure of the project.db
NamespaceOptional: this will be the prefix to all generated object namessales
Schema NameOptional: Choose a specific name for the HDI container schema used for deployment. See below for more details.SAMPLE_SCHEMA
SAP HANA Database Version SAP HANA Service (legacy service in SAP BTP) or HANA Cloud.

Default Schema Name of the HDB Module Container

During the creation of an HDB module, specifying a schema name is optional.

If you don't specify a schema name, it's generated during the deployment of a project with the following name structure:

Code Snippet
1
<project_name>_<hdi_service_name_in_MTA>_<numeric_increment>

For example: MYPROJECT_HDI_DB_1

To identify the name of the generated database schema, open an SQL console connected to the container and execute the following SQL query:

Code Snippet
1
select CURRENT_SCHEMA from DUMMY;

Specifying a Schema Name for the HDI Container

If you prefer not to have the schema name generated and would like to use a specific schema name, this is possible. This is done in the descriptor file mta.yaml of your project, and more specifically in the parameters of the hdi-container service that is defined as a resource used by the HDB module.

The following sample shows the additional parameters section of the mta.yaml file where the schema name is defined:

Code Snippet
12345678
resources: - name: hdi-cont parameters: config: schema: <YOUR_SCHEMA_NAME> properties: hdi-container-name: ${service-name} type: com.sap.xs.hdi-container

Then, the schema generated during the first build of the HDB module is named as follows:

Code Snippet
1
<YOUR_SCHEMA_NAME>_<numeric_increment>

Caution

Although it's possible to force the schema name to be exactly what you specify in the mta.yaml file, by adding a parameter in the config section, this can generate schema naming conflicts in case several projects use the same schema name, so is usually not recommended, and you should allow the schema name to be generates automatically as a unique value.

Create a Project with an HDB Module

Bind an Existing HDB Module to an HDI Service

HDI Cockpit

Containers play a key role in database development and provide an efficient method of isolating the database runtime artifacts and encouraging modularization. Containers are a key component of HDI development in SAP HANA Cloud. User and roles are granted privileges on containers so that they can access the resources they contain.

An SAP HANA Cloud database will usually have many containers, which have been automatically generated when developers deploy database artifacts to the runtime. Each container will have various combination of users and role privileges assigned. This can soon become difficult to manage and so troubleshooting and monitoring can become difficult.

Screen capture of the HDI Administration cockpit. For details, refer to the surrounding text.

The HANA Deployment Infrastructure (HDI) Cockpit is a tool that provides visibility of all containers. You can add them into container groups and display the users and roles that have been granted access to them.

Log in to track your progress & complete quizzes