Which Node.js module do you use to run an SQL statement against the SAP HANA database? Please choose the correct answer.
Answer : D
To run an SQL statement against the SAP HANA database from a Node.js application, you need to use the @sap/hdbext module. This module provides a wrapper for the SAP HANA client for Node.js, which enables you to connect to the SAP HANA database and execute SQL statements. You can use this module to create a database connection pool, execute queries, fetch results, and handle errors. The other options are not correct because:
A) @sap/hdi: This module provides functions to interact with the SAP HANA Deployment Infrastructure (HDI), which enables you to create and manage database artifacts, such as tables, views, procedures, and functions, using the HDI container service. You can use this module to deploy, undeploy, and access HDI containers, but not to run SQL statements against the SAP HANA database.
B) @sap/xsenv: This module provides functions to load service configuration and credentials from the environment variables of the SAP Cloud Platform or the SAP HANA XS Advanced Model. You can use this module to access the SAP HANA database service information, such as host, port, user, password, and schema, but not to run SQL statements against the SAP HANA database.
C) @sap/xssec: This module provides functions to handle authentication and authorization for Node.js applications using the User Account and Authentication (UAA) service and the XSUAA service. You can use this module to verify JWT tokens, check scopes, and obtain user information, but not to run SQL statements against the SAP HANA database.
SAP HANA Developer Guide for SAP HANA Web IDE, Chapter 5, Section 5.3
SAP HANA Developer Guide for SAP HANA Web IDE, Chapter 5, Section 5.4
SAP HANA Developer Guide for SAP HANA Web IDE, Chapter 5, Section 5.5
SAP HANA Developer Guide for SAP HANA Web IDE, Chapter 5, Section 5.6
You need to combine data from different database tables within your OData service. Which capability do you use for this relationship? Please choose the correct answer.
Answer : C
An OData service is a web service that exposes data from a data source, such as a SAP HANA database, in a standardized and interoperable format. An OData service consists of one or more entity sets, which are collections of entities of the same type. An entity is a data object that has properties and a unique key. An OData service can also define associations between entity sets, which are relationships that specify how entities are related to each other. For example, an association can define a one-to-many or a many-to-many relationship between two entity sets. Associations enable an OData service to combine data from different database tables within the same service. For example, an OData service can define an association between a Products entity set and a Categories entity set, where each product belongs to one category and each category can have multiple products. This association can be used to query or update data from both entity sets in a single request.
The other options are incorrect because they are not capabilities that can be used to combine data from different database tables within an OData service. Aggregations are operations that summarize or group data, such as count, sum, average, or min/max. Projections are operations that select or filter data, such as select, expand, or filter. Entity sets are collections of entities of the same type, but they do not define relationships between entities.Reference:
SAP HANA Platform 2.0 SPS06: OData V4 Developer Guide, Section 2.1
SAP HANA Platform 2.0 SPS06: OData V4 Developer Guide, Section 2.3
SAP HANA Platform 2.0 SPS06: OData V4 Developer Guide, Section 2.4
SAP HANA Platform 2.0 SPS06: OData V4 Developer Guide, Section 2.5
SAP HANA Platform 2.0 SPS06: OData V4 Developer Guide, Section 2.6
How do you specify the target currency for currency conversion in calculation views? There are 3 correct answers to this question.
Answer : A, C, D
To specify the target currency for currency conversion in calculation views, you can use one of the following methods:
In a column: You can associate the measure with an attribute column that contains the target currency code. For example, if you have a table that stores the sales amount and the currency code for each transaction, you can use the currency code column as the target currency for the sales amount measure.
With an input parameter: You can create an input parameter that allows the user to select or enter the target currency code at runtime. For example, if you want to display the sales amount in different currencies based on the user's preference, you can use an input parameter as the target currency for the sales amount measure.
What is the package descriptor package.json used for? There are 2 correct answers to this question.
Answer : C, D
The package descriptor package.json is a JSON file that defines the build, deployment, and runtime dependencies of a JavaScript application in SAP HANA XS Advanced. The package.json file is mandatory for JavaScript applications and it is located in the general section of the project. As well as the application name and version, dependencies to other Node.js modules, the Node.js version, run scripts, and the main program are configured. The package descriptor package.json is used for the following purposes:
To list the package dependencies: The package.json file contains a dependencies property that lists the names and versions of the Node.js modules that the application depends on. These modules are installed by the npm install command during the build process and are available in the node_modules folder of the application. The dependencies property can also specify the scope and type of the dependencies, such as devDependencies for development-only modules, or peerDependencies for modules that are required by other modules.
To define the routes: The package.json file contains a sap.cloud.service property that defines the name of the service that the application provides or consumes. This name is used to generate the routes for the application in the XS advanced environment. The routes are defined in the xs-app.json file, which is located in the same folder as the package.json file. The routes specify the rules for forwarding requests to the back-end microservices or destinations.
The following purposes are not achieved by the package descriptor package.json, but by other files or tools:
To define back-end destinations: The back-end destinations are defined in the mta.yaml file, which is the deployment descriptor file that specifies the metadata and dependencies for the multi-target application (MTA) project. The mta.yaml file is located in the root folder of the MTA project and is used by the Cloud Foundry environment to deploy the application. The back-end destinations are declared as resources of type org.cloudfoundry.existing-service or org.cloudfoundry.managed-service, and are bound to the application modules by the requires property.
To set the router version: The router version is set by the @sap/approuter module, which is a Node.js module that provides the application router service for the XS advanced environment. The application router service is responsible for routing requests to the appropriate destinations and for authenticating users. The @sap/approuter module is installed by the npm install command during the build process and is available in the node_modules folder of the application. The version of the @sap/approuter module is specified in the dependencies property of the package.json file.
[SAP HANA Deployment Infrastructure Reference], Chapter 5: HDI with XS Advanced, Section 5.1: Developing with the SAP Web IDE for SAP HANA, Subsection 5.1.2: Configure Application Routing (xs-app.json), pp. 101-104.
[SAP HANA Platform Documentation], SAP HANA Developer Guide for SAP HANA XS Advanced Model, Chapter 4: Developing HTML5 Applications, Section 4.1: Developing HTML5 Applications Using SAP Web IDE for SAP HANA, Subsection 4.1.3: Configure Application Routing (xs-app.json), pp. 77-80.
You work on a multi-target application that uses the SAP HANA Deployment Infrastructure (HDI). Which operations can you perform in
the SAP Web IDE for SAP HANA?
There are 2 correct answers to this question.
Answer : B, D
The SAP Web IDE for SAP HANA is a web-based development tool that allows you to create and manage multi-target applications (MTAs) that use the SAP HANA Deployment Infrastructure (HDI). HDI is a service layer that enables you to deploy database development artifacts to HDI containers, which are isolated schemas that represent runtime objects. Some of the operations that you can perform in the SAP Web IDE for SAP HANA are:
Deploy HTML5 modules to the SAP HANA database: HTML5 modules are web applications that run on the XS advanced runtime and can access HDI containers via service bindings. You can create, edit, test, and deploy HTML5 modules from the SAP Web IDE for SAP HANA using the MTA development perspective and the build and run commands. You can also use the HTML5 module template wizard to generate a basic HTML5 module with the required configuration files and dependencies.
Configure the artifact namespaces: Artifact namespaces are prefixes that are added to the names of the database artifacts that are deployed to the HDI containers. They help to avoid name conflicts and to organize the artifacts in a logical way. You can configure the artifact namespaces in the SAP Web IDE for SAP HANA by editing the .hdiconfig file in the db module of your MTA project. You can also use the namespace template wizard to generate a .hdiconfig file with a default namespace.
The following operations are not possible or not recommended in the SAP Web IDE for SAP HANA:
Create objects in the SAP HANA repository: The SAP HANA repository is a legacy feature that was used to store and manage design-time artifacts in SAP HANA 1.0. It has been deprecated since SAP HANA 2.0 SPS 02 and replaced by HDI. Therefore, you should not create objects in the SAP HANA repository, but rather use HDI containers and the SAP Web IDE for SAP HANA to develop and deploy database artifacts.
Choose the supported SAP HANA versions: The SAP Web IDE for SAP HANA does not allow you to choose the supported SAP HANA versions for your MTA project. The supported SAP HANA versions depend on the HDI version and the SAP HANA Cloud Platform, which are determined by the target environment where you deploy your MTA project. You can check the compatibility of the HDI version and the SAP HANA Cloud Platform in the SAP HANA Deployment Infrastructure Reference.
[SAP HANA Deployment Infrastructure Reference], Chapter 5: HDI with XS Advanced, Section 5.1: Developing with the SAP Web IDE for SAP HANA, pp. 101-106.
[SAP HANA Platform Documentation], SAP HANA Developer Guide for SAP HANA XS Advanced Model, Chapter 4: Developing HTML5 Applications, Section 4.1: Developing HTML5 Applications Using SAP Web IDE for SAP HANA, pp. 77-82.
Which of the following activities are part of the development lifecycle using SAP HANA extended application services, advanced model
(XS advanced)?
There are 2 correct answers to this question.
Answer : A, D
Create an MTA project: An MTA project is a container for the source code and configuration files of a multi-target application (MTA), which is a modular and scalable application that runs on the XS advanced application server. You can create an MTA project using the SAP Web IDE for SAP HANA, which is a web-based development environment that provides tools and templates for developing MTA components, such as database modules, Node.js modules, HTML5 modules, and Java modules. You can also use the command-line interface (CLI) of the Cloud MTA Build Tool (MBT) to create an MTA project from scratch or from an existing MTA archive.
Export the project as an MTA archive: An MTA archive is a deployable package that contains the compiled and packaged MTA components, along with the MTA descriptor file (mta.yaml) and the MTA metadata file (MANIFEST.MF). You can export the MTA project as an MTA archive using the SAP Web IDE for SAP HANA, which automatically builds and validates the MTA components and generates the MTA archive. You can also use the CLI of the MBT to build the MTA archive from the MTA project source files.
Deploy the MTA archive: To deploy the MTA archive, you can use the XS CLI, which is a command-line tool that allows you to interact with the XS advanced application server and perform various tasks, such as creating organizations and spaces, managing users and roles, and deploying and undeploying MTA archives. You can also use the SAP HANA cockpit, which is a web-based administration and monitoring tool that provides a graphical interface for deploying and managing MTA archives.
SAP HANA Platform, SAP HANA Extended Application Services, Classic Model, Overview
Which trace do you use to create a graphical representation of an individual SQL Statement? Please choose the correct answer.
Answer : C