Which rules apply to declarative logic in SQL Script? There are 2 correct answers to this question.
It supports the full set of SQL Script.
It defines how data is processed.
It is free of side effects.
lt declares the flow of data.
According to the SAP HANA Developer Guide, declarative logic in SQL Script is a way of expressing complex data transformations by means of classical relational operators, such as selection, projection, join, aggregation, etc. Declarative logic does not specify how data is processed, but rather what the desired result is. The SAP HANA database has the freedom to optimize the data flow and execution plan, which may result in better performance. Declarative logic is free of side effects, meaning that it does not modify any data or state outside the scope of the statement. Declarative logic declares the flow of data, meaning that it binds new variables that are referenced elsewhere in the body of the procedure or function. The other options are incorrect, because:
References: SAP HANA Developer Guide, Chapter 6, Section 6.4.2, page 2111.
You need to install SAP HANA 2.0, express edition to develop a native SAP HANA application. Which of the following deployment options do you have?
There are 2 correct answers to this question.
Installation on Windows Server
Installation on Mac OS
Installation on Linux OS
Usage of virtual machine on Microsoft Windows
SAP HANA 2.0, express edition is a streamlined version of SAP HANA that can run on laptops and other resource-constrained hosts. It supports native SAP HANA application development and can be installed on Linux OS or used as a virtual machine on Microsoft Windows. Installation on Windows Server or Mac OS is not supported by SAP HANA 2.0, express edition. References:
You create a simple data model to store user information. The model contains two tables: one for the user information, and the other for user address details.
The user can only have one address. You also need a view to show the complete information of the user including the address.
Which actions do you perform if you use CDS artifacts only? Please choose the correct answer.
Create two entities for the user and address.
Create an association in the user entity to the address entity.
Define a User Details view using select on the address entity and using the association to read the user information.
Create two entities for the user and address.
Create an association in the user entity to the address entity.
Define a User Details view using select on the user entity and using the association to read the address information.
Create two entities for the user and address.
Extend the user entity with address columns.
Create a view named User Details using select on the user entity.
x-s Create two entities for the user and address.
Create a User Details calculation view and join the user and address information.
The correct action is to define a User Details view using select on the user entity and using the association to read the address information. This way, you can leverage the power of CDS associations to create a join between the user and address entities without explicitly specifying the join condition. You can also use the association path to access the address fields in the view definition. This approach simplifies the data model and avoids redundancy. Option A is incorrect because it selects from the address entity instead of the user entity, which is not the desired output. Option B is incorrect because it extends the user entity with address columns, which is unnecessary and violates the normalization principle. Option D is incorrect because it creates a calculation view instead of a CDS view, which is not the requirement. Calculation views are graphical or scripted views that can be used for complex calculations and data transformations, but they are not CDS artifacts. References:
What do you use to set up unit testing for your SQL Script procedure? Please choose the correct answer.
SQL Script logging procedures
A library with language SQLSCRIPT TEST
The SQL Script debugger
The SQL Script Code Analyzer
To set up unit testing for your SQL Script procedure, you use a library with language SQLSCRIPT TEST. A library with language SQLSCRIPT TEST is a special type of library that contains SQL Script test cases for testing the behavior and performance of SQL Script procedures. A SQL Script test case is a SQL Script procedure that has the prefix TEST_ and that uses the ASSERT and EXPECT statements to verify the expected results and outputs of the procedure under test. A library with language SQLSCRIPT TEST can be created in the SAP Web IDE for SAP HANA or in the SAP HANA Studio, and can be executed by using the SQL Script Test Framework, which is a tool that runs the test cases and generates a test report.
The following options are not used to set up unit testing for your SQL Script procedure, but for other purposes:
References:
Which of the following are characteristics of database procedures?
Database procedures can have both input and output parameters; however, a parameter CANNOT be both input and output.
Database procedures can have several output parameters, and a mix of both scalar and table types is possible.
If, in the database procedure header, you use the READS SQL DATA option, then INSERT statements are prohibited; however, dynamic SQL is allowed.
If, in the database procedure header, you use the SQL SECURITY INVOKER option, then only the owner of the procedure can start it.
According to the SAP HANA SQLScript Reference1, database procedures are subroutines that can be called from SQL statements or other database procedures. Database procedures can have the following characteristics:
References: 1: SAP HANA SQLScript Reference 2: Parameters of Database Procedures 3: Output Parameters of Database Procedures 4: Procedure Header Options
You need to create a native SAP HANA application that fully leverages the SAP HANA platform. How do you implement data-intensive
calculations?
Please choose the correct answer.
Push the calculations onto the application layer.
Push the calculations onto the database layer
Push the calculations onto the presentation layer.
Distribute calculations between application layer and presentation layer.
To create a native SAP HANA application that fully leverages the SAP HANA platform, you should implement data-intensive calculations on the database layer, using SQLScript or calculation views. SQLScript is a scripting language that allows you to write stored procedures, functions, and triggers that perform complex calculations and data transformations on the SAP HANA database. Calculation views are graphical or scripted views that define data models based on tables, views, or other calculation views, and apply filters, joins, aggregations, and other operations on the data. By pushing the calculations onto the database layer, you can take advantage of the in-memory processing, parallelization, and optimization capabilities of SAP HANA, and reduce the data transfer and network latency between the application layer and the database layer123.
The other options are not correct because they do not fully leverage the SAP HANA platform, and they may result in poor performance, high resource consumption, and increased complexity. Pushing the calculations onto the application layer means that you use a programming language, such as Java or Node.js, to perform the calculations on the application server, which may not be as efficient or scalable as the database server. Pushing the calculations onto the presentation layer means that you use a UI framework, such as SAPUI5 or SAP Fiori, to perform the calculations on the client device, such as a browser or a mobile device, which may not have enough processing power or memory to handle large or complex data sets. Distributing the calculations between the application layer and the presentation layer means that you split the calculations into different parts and execute them on different layers, which may introduce inconsistency, redundancy, and dependency issues. References:
Which artifacts do you define in the persistence model to access objects in an external SAP HANA Deployment Infrastructure container? Please choose the correct answer.
Views
Synonyms
Imports
Procedures
To access objects in an external SAP HANA Deployment Infrastructure (HDI) container, you need to define synonyms in the persistence model. Synonyms are design-time artifacts that provide a logical name and a reference to an object in another schema or HDI container. Synonyms allow you to access the data and functionality of the external objects without granting direct privileges or using fully qualified names1. Synonyms can be created for tables, views, procedures, functions, and other database objects2.
The other options, views, imports, and procedures, are not artifacts that can be defined in the persistence model to access objects in an external HDI container. Views are artifacts that define a logical data model based on one or more tables or other views. Views can be used to query data from different sources, but they do not provide a reference to an external object3. Imports are artifacts that allow you to import another CDS entity or a database table into the current CDS entity, and use its columns as part of the projection list. Imports can be used to reuse data definitions, but they do not provide a reference to an external object either4. Procedures are artifacts that define a set of SQL statements that can be executed as a unit. Procedures can be used to implement complex logic and calculations, but they do not provide a reference to an external object either5. References: 1: Synonyms | SAP Help Portal 2: Synonym Definition | SAP Help Portal 3: Views | SAP Help Portal 4: Import | SAP Help Portal 5: Procedure Definition | SAP Help Portal
You define exception handling in a SQL Script procedure. What can you use declare exit handlers for? There are 2 correct answers to this question.
Generic SQL conditions
Generic SQL exceptions
Specific SQL error codes
Specific SQL conditions
You can use declare exit handlers in a SQL Script procedure to handle generic SQL exceptions or specific SQL error codes. An exit handler is a custom handler that defines a block of code to be executed when an exception occurs in the procedure. You can declare an exit handler for a generic SQL exception, which is any error that is raised by the database system, such as syntax errors, constraint violations, or division by zero. You can also declare an exit handler for a specific SQL error code, which is a numeric code that identifies the type and severity of the error, such as 301 for unique constraint violation, or 1299 for no data found12.
The other two options, generic SQL conditions and specific SQL conditions, are not valid arguments for declare exit handlers. A condition is a named exception that can be declared by using a condition variable and optionally associated with an SQL error code. A condition can be used to signal or resignal an exception in the procedure, or to register a continue handler, which is a custom handler that defines a block of code to be executed when an exception occurs, but does not exit the procedure. However, a condition cannot be used to register an exit handler, as the syntax requires an SQL error code or a generic SQL exception12. References: 1: Exception Handling | SAP Help Portal 2: Exception Handling Examples | SAP Help Portal
What key words are contained in the application descriptor file (xs-app.json)? There are 2 correct answers to this question.
routes
role-templates
tenant-mode
authentication Method
The application descriptor file (xs-app.json) is a JSON file that defines the routing and authentication configuration for an HTML5 module in a multi-target application (MTA) project. It is located in the root folder of the HTML5 module and is used by the managed application router to dispatch requests to the appropriate destinations and to authenticate users. Some of the key words that are contained in the xs-app.json file are:
The following key words are not contained in the xs-app.json file, but in other files related to the MTA project:
References:
What is the package descriptor package.json used for? There are 2 correct answers to this question.
To define back-end destinations
To set the router version
To list the package dependencies
To define the routes
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:
The following purposes are not achieved by the package descriptor package.json, but by other files or tools:
References:
Which trace do you use to create a graphical representation of an individual SQL Statement? Please choose the correct answer.
Expensive statements trace
Performance trace
Plan trace
SQL trace
To create a graphical representation of an individual SQL statement, you can use the Plan trace. The Plan trace is a tool that allows you to generate and visualize the execution plan of an SQL statement, with estimated or actual performance information for each operator. The Plan trace can help you understand and analyze the query optimization and execution process, and identify potential performance bottlenecks or improvement opportunities12.
The other options, Expensive statements trace, Performance trace, and SQL trace, are not tools that can create a graphical representation of an individual SQL statement. The Expensive statements trace is a tool that records the SQL statements that exceed a certain threshold of resource consumption, such as CPU time, memory, or disk reads. The Expensive statements trace can help you identify the most resource-intensive queries in the system, but it does not provide a graphical view of the execution plan3. The Performance trace is a tool that records the performance statistics of the database operations, such as SQL statements, transactions, procedures, or triggers. The Performance trace can help you measure and compare the performance of different database operations, but it does not provide a graphical view of the execution plan either. The SQL trace is a tool that captures every SQL statement that enters the database at the session layer. The SQL trace can help you monitor and troubleshoot the SQL statements that are executed in the database, but it does not provide a graphical view of the execution plan either. References: 1: Plan Trace | SAP Help Portal 2: Analyzing SQL Execution with the Plan Visualizer | SAP Help Portal 3: Expensive Statements Trace | SAP Help Portal : [Performance Trace | SAP Help Portal] : [SQL Trace | SAP Help Portal]
You want to exclusively use declarative logic in an SQL Script procedure. Which of the following operators can you use? There are 2 correct answers to this question.
COMM IT statement
IF condition
TABLE variable
MAP_REDUCE function
To exclusively use declarative logic in an SQL Script procedure, you can use TABLE variables and MAP_REDUCE functions. TABLE variables are variables that store intermediate results of SQL queries in a tabular format. You can use TABLE variables to define data transformations and data flows without using imperative statements or side effects1. MAP_REDUCE functions are functions that apply a map function to each row of a table and then aggregate the results using a reduce function. You can use MAP_REDUCE functions to implement complex algorithms and calculations in a declarative way2.
The other two options, COMMIT statement and IF condition, are not operators that can be used to exclusively use declarative logic in an SQL Script procedure. COMMIT statement is a statement that ends a transaction and makes all changes permanent in the database. You cannot use COMMIT statement in a declarative logic, as it is an imperative statement that has a side effect3. IF condition is a condition that executes a block of code based on a boolean expression. You cannot use IF condition in a declarative logic, as it is an imperative construct that introduces control flow4. References: 1: TABLE Variables | SAP Help Portal 2: MAP_REDUCE Function | SAP Help Portal 3: COMMIT Statement | SAP Help Portal 4: IF Statement | SAP Help Portal
What are the issue categories that SQL Script Code Analyser scans for? There are 3 correct answers to this question.
Performance
Privileges
Security
Business logic
Consistency
The SQL Script Code Analyser is a tool that scans SQL Script code for potential issues and provides suggestions for improvement. The tool can be accessed from the SAP Web IDE for SAP HANA or from the SAP HANA database explorer. The tool scans for issues in the following categories:
The other options are incorrect because privileges and business logic are not issue categories that the SQL Script Code Analyser scans for. Privileges are handled by the SAP HANA Deployment Infrastructure framework, which automatically grants the necessary privileges to the technical users and roles that access the HDI container objects. Business logic is the domain-specific logic that defines the functionality and behavior of the SQL Script code, and it is not within the scope of the tool to verify or validate it. References:
What do you reference in a role template? Please choose the correct answer.
Role Collections
Roles
Routes
Scopes
A role template is a JSON file that defines the permissions and scopes for a specific role in a multi-target application. A scope is a string that represents a specific access right or privilege for a resource or service. For example, a scope can be used to grant read or write access to a database table or an OData service. A role template references the scopes that are required for the role to function properly. A role collection is a group of roles that can be assigned to a user or a group. A role is a collection of permissions and scopes that define what a user can do in an application. A route is a mapping between a URL path and a destination service in a multi-target application. A route is not related to a role template. References:
Which SAP HANA system views contain information about the object ownership? There are 2 correct answers to this question.
SCHEMAS
TABLES
OBJECTS
ROLES
The SAP HANA system views that contain information about the object ownership are SCHEMAS and ROLES. The SCHEMAS view provides information about the schemas in the database, including the owner of each schema1. The ROLES view provides information about the roles in the database, including the owner of each role2. The object ownership indicates who has the right to grant or revoke privileges on the object, or to alter or drop the object3.
The other two options, TABLES and OBJECTS, do not contain information about the object ownership. The TABLES view provides information about the tables in the database, but not the owner of each table4. The OBJECTS view provides information about the objects in the database, such as views, procedures, functions, etc., but not the owner of each object5. References: 1: SCHEMAS System View | SAP Help Portal 2: ROLES System View | SAP Help Portal 3: Object Ownership | SAP Help Portal 4: TABLES System View | SAP Help Portal 5: OBJECTS System View | SAP Help Portal
Which tool do you use to create a calculation view in a multi-target application? Please choose the correct answer.
SAP Web IDE for SAP HANA
SAP HANA database explorer
SAP HANA Web-based Development Workbench
SAP HANA studio
To create a calculation view in a multi-target application, you need to use the SAP Web IDE for SAP HANA, which is a web-based development environment that supports the full development lifecycle of SAP HANA applications. The SAP Web IDE for SAP HANA provides graphical and code-based editors for creating calculation views, as well as other database artifacts, such as tables, views, procedures, functions, and more. You can also use the SAP Web IDE for SAP HANA to create and deploy multi-target applications, which are modular applications that consist of multiple components, such as database modules, Node.js modules, Java modules, HTML5 modules, etc. The other options are incorrect because the SAP HANA database explorer, the SAP HANA Web-based Development Workbench, and the SAP HANA studio do not support the creation of calculation views in a multi-target application. The SAP HANA database explorer is a web-based tool that allows you to browse, manage, and query SAP HANA databases, but not to create or edit database artifacts. The SAP HANA Web-based Development Workbench is a deprecated tool that was used to create and edit SAP HANA XS classic applications, but not multi-target applications. The SAP HANA studio is a desktop tool that was used to create and edit SAP HANA native applications, but not multi-target applications. References:
Which parameters does the APPLY_FILTER function support? There are 2 correct answers to this question.
Filter condition
Join condition
Entity set
Table variable
The APPLY_FILTER function is a SQLScript function that applies a filter condition to a table variable and returns a new table variable with the filtered rows. The APPLY_FILTER function supports the following parameters12:
The other options are not correct because they are not parameters of the APPLY_FILTER function. A join condition is a parameter of the APPLY_FILTER_JOIN function, which applies a filter condition to two table variables and returns a new table variable with the joined and filtered rows. An entity set is a parameter of the APPLY_FILTER_ENTITY function, which applies a filter condition to an entity set and returns a new entity set with the filtered rows. These functions are part of the SAP HANA Predictive Analysis Library (PAL), and they are not part of the SQLScript language3. References:
What are the characteristics of the calculation view of type "SQL Access Only"? There are 2 correct answers to this question.
Can be directly exposed to all client tools
Can be directly used for multidimensional analysis
Can be direct y accessed via SQL
Can be directly used as modelled data source for another view
A calculation view of type “SQL Access Only” is a calculation view that is not visible to the reporting tools and does not support multidimensional reporting. However, it can be directly accessed via SQL and used as a modelled data source for another view. This type of calculation view is useful for scenarios where you want to perform complex calculations or transformations on the data, but do not need to expose the result to the end users or analytical applications. You can use the SQL Access Only calculation view as an intermediate step in your data modelling process, and then use another calculation view with data category Cube or Dimension to provide the final output for reporting or analysis. The other options are incorrect because a calculation view of type “SQL Access Only” cannot be directly exposed to all client tools or used for multidimensional analysis. These features are only available for calculation views with data category Cube or Dimension. References:
Which Node.js module do you use to run an SQL statement against the SAP HANA database? Please choose the correct answer.
@sap/hdi
@sap/xsenv
@sap/xssec
@sap/hdbext
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:
References:
To perform a specific task of an XS advanced application, what does a user need? Please choose the correct answer.
To have directly assigned a Role Collection
To have directly assigned a Scope
To be assigned to an Organization
To be assigned to a Space
According to the SAP HANA Developer Guide, to perform a specific task of an XS advanced application, a user needs to have directly assigned a role collection. A role collection is a set of roles that grant the user the necessary privileges and authorizations to access and use the application. A role collection can be assigned to a user either directly by an administrator, or indirectly by a workflow or a self-service. The other options are incorrect, because:
References: SAP HANA Developer Guide, Chapter 6, Section 6.4.2, page 2111.
How do you debug a Node.js module in SAP Web IDE for SAP HANA? Please choose the correct answer.
Set the enabled parameter to true in the section debugger of the xsengine.ini file.
Add the sap.hana .xs.debugger::Debugger role to the HDI Container's #RT User.
Start the debugger from the XS command line interface and run the program in SAP Web IDE for SAP HANA.
Attach the debugger to the application in the SAP Web IDE for SAP HANA.
According to the SAP Web IDE for SAP HANA Developer Guide, you can debug a Node.js module in SAP Web IDE for SAP HANA by attaching the debugger to the application in the SAP Web IDE for SAP HANA. To do this, you need to open the debugger panel, attach your application, and choose your multi-target application and select a debug target. Then, you can perform the regular debugging tasks, such as setting breakpoints, stepping through the code, examining the variables, and so on. The other options are incorrect, because:
References: SAP Web IDE for SAP HANA Developer Guide, Chapter 6, Section 6.4.2, page 2111.
An OData service contains an entity set called Products. Which resource path do you add to the OData service URL to view all available products?
Please choose the correct answer.
/Products/$metadata
/Products/'
/Products
/Products/ALL
According to the SAP HANA Developer Guide, the resource path of an OData service URL identifies the entity or entity set that is requested. The resource path consists of the service root URI followed by a slash (/) and the name of the entity set. For example, to view all available products in the Products entity set, the resource path is /Products. The other options are incorrect, because:
References: SAP HANA Developer Guide, Chapter 6, Section 6.4.2, page 2111.
Which Git commands are available with the SAP Web IDE for SAP HANA? There are 3 correct answers to this question.
Test changes
Push code
Clone a repository
Redeploy the code
Merge changes
When you create a new project in SAP Web IDE for SAP HANA, you must specify the project name and the template. The project name is a unique identifier for your project that is used to create the folder structure and the deployment descriptor file (mta.yaml) for your project. The template is a predefined set of files and configurations that provide the basic structure and functionality for your project. You can choose from various templates, such as SAP HANA Database Project, SAP Cloud Platform Business Application, SAP Fiori Freestyle Project, and more, depending on your development scenario and requirements.
The following information is not required or not applicable when you create a new project in SAP Web IDE for SAP HANA:
References:
TESTED 26 Apr 2024