SAP HANA Interview Questions – 2

34.What is a Simple Measure?
Simple Measure is a measurable analytical element that is derived from the data foundation.

35.What is a Calculated Measure?
Calculated Measures are defined based on a combination of data from OLAP cubes, arithmetic operators, constants, and functions.

36.What is a Restricted Measure?
Restricted measures are used to filter the value for an output field based on the user-defined rules For example you can restrict the revenue column only for Region = APJ, Year = 2013.

37.What are Counters?
Counters add a new measure to the Calculation view definition to count the recurrence of an attribute. For example, to count how many times Product appears.

38.What is an Attribute View?
Attribute views are used to model entity based on the relationships between attribute data contained in multiple source tables. You can model Columns, Calculated columns and Hierarchies.

Also you can fine-tune the attributes of an Attribute view:
Can apply filter to restrict values
Can be defined as Hidden so that they can be processed but not visible to end users
Can be defined as key attributes and used when joining multiple tables
Can be further drill down by ‘Drill Down Enable’ property.

39.What are the tables to be imported for creating attribute view of type Time?
T009 and T009B.

40.What is Label Mapping?
We can choose to associate an attribute with another attribute description. Label mapping is also called as Description mapping. For example if A1 has a label column B1, then you can rename B1 to A1.description. The related columns appear side by side during data preview.

41.What happens when one of the table in Attribute view has modified column with data type?
It reflects the previous state of the columns, even if you remove and add it again. It is referring to the cache. To resolve this issue close the editor and reopen it.

42.What happens when you open an attribute view with a missing column in the required object?
An error will be shown “column is not found in table schemaname.tablename” and the editor does not open. To make it consistent

Open the required object and add the missing column/attribute/measure temporarily
Now open the object which was previously giving error
Find all references to this column, Save the object
Now go ahead and delete the column from the required object.

43.What is an Analytic view?
Analytic views are used to model data that includes measures. In case of multiple tables, measures must originate from only one of these tables (central table). You can model Columns, Calculated columns, Restricted columns, Variables,  and Input parameters.

Also you can fine-tune the attributes of an Analytic view:
Can apply filter to restrict values
Can be defined as Hidden so that they can be processed but not visible to end users
Can be defined as key attributes and used when joining multiple tables
Can be further drill down by ‘Drill Down Enable’ property
You can model Aggregation type on measures
You can model Currency and Unit of Measure.

44.Can we include Attribute views in Analytic view definition?

45.What does the Scenario panel of Analytic view editor contains?
Data Foundation: represents the tables used for defining the fact table of the view. You can specify the central table by selecting a value in ‘Central Entity’ property.
Logical Join: represents the relation between fact table and attribute views to create start schema.
Semantics: represents the output structure of the view.

46.What does the aggregation type ‘Calculate Before Aggregation’ mean?
If you select ‘Calculate Before Aggregation’, the calculation happens as per the expression specified and then the results are aggregated as SUM, MAX, MIN, or COUNT. If it is  NOT selected, the calculation happens as per the expression specified but the data is not aggregated but shown as FORMULA.

47.How to activate the other objects (required or impacted objects) along with current object?
By using ‘Save and Activate All’ option in the toolbar.

48.Can you add column views to Analytic view and Calculation view?
We can add column views in a Calculation view but not in the Analytic view.

49.Consider there is a table that contains product ID’s with no product description and you have a text table for products that has language specific description for each product? How can you get the language specific data?
Create a text join between these two tables. The right table should be the text table and is mandatory to specify the “Language Column” in the ‘Properties’ view.

50.What are the restrictions while creating the join between the views and fact table?
A table should not appear twice in any join path, i.e. Self join is not supported.
While creating join between Analytic view and Attribute view the same table cannot be used in both the views.

51.What is Calculation view?
Calculation view is more advanced slice of the data and can include measures from multiple source of tables, can include advanced SQL logic. The data foundation of the calculation view can include any combination of tables, column views, attribute views and analytic views. We can create joins, unions, projections, and aggregation levels on the sources. You can model Attributes, Measures, Calculated measures, Counters, Hierarchies (created outside of the attribute view), Variables and Input parameters.

52.Calculation views are modeled based on what?
Graphical views or Scripted views but not as SQLScript. However there are exceptions to this rule. SQLScript with the following properties can be used in Calculation view:
No input parameters
Always Read-only (do not make changes to database)
Side-effect free.

53.What are the option available in ‘Run With’ while creating calculation view?
Definer’s Right, Invoker’s Right.
Definers right: System uses the rights of  the definer while executing the view or procedure for any user.
Invokers right: System uses the rights of the current user while executing the view or procedure.

54.While creating a Graphical Calculation view, what are the options available in Tools palette?
Union, Join, Projection, and Aggregation.
Note: You can have only one source of input for Projection and Aggregation views.
You can create filters on Projection and Aggregation view attributes.

55.How to create Counters in Graphical Calculation view?
For example to get the number of distinct values of an attribute:
Go to the Output pane, right click Counters
From the context menu, choose New
Choose Attribute
Click ok.

56.Is it mandatory to include measures for Calculation view?
No. Calculation view containing no measures works like an attribute view and is not available for reporting purposes.

57.How do you debug the Calculation view with lot of complexity at each level?
By previewing the data of an intermediate node.

58.What is Mapping input parameter in Calculation view?
It is used for mapping the input parameters in the underlying data sources of the calculation view with calculation view parameters.

59.In calculation view, What is the option ‘Auto Map by Name’ used for?
It automatically creates the input parameters corresponding to the source and perform a 1:1 mapping.

60.What are the options available in Source input parameter?
Create New Map 1:1
Map by Name
Remove Mapping

61.Consider there are two tables (Actual sales and Planned sales) with similar structures. I want to see the combined data in a single view but at the same time how can I differentiate the data between these two tables

Create a union view (Graphical) between the two tables and have a ‘Constant column’ indicating constant values like ‘A’ for Actual sales and ‘P’ for Planned sales. The default value for the constant column is NULL.

62.What is a Constant column and how to create it?
In a Union view, a Constant column is created for the output attributes for which there is no mapping to the source attributes. To create Constant column:
Right click the attribute in the target list
Choose Manage Mappings
To map the source to the target column, select the required source from the dropdown list
To assign a default value to the constant column, enter a value in the Constant value field
Select the required data type, length and scale as required
Click ok.

63.What is the difference between HANA Variable and Input parameter?
HANA Variables do not impact the execution and used to filter the attributes, for example we can filter a result to a specific country or product  and are applied in the WHERE clause of the SQL query.
HANA Input parameters used to manipulate the execution of the information model, for example currency codes or dates when exchange rates have to be calculated and are passed as PLACEHOLDER in the FROM clause of the SQL query.

64.In which configuration table you can find the variables information?
You can find in _SYS_BI schema

65.What are the different types of Input parameters supported?
Attribute value/Column
Currency (Available in Calculation view only)
Date (Available in Calculation view only)
Static list
Derived from Table (Available in Analytic and Graphical Calculation view)
Direct Type (Available in Analytic view)

66.How can you check whether an input parameter is mandatory or not?
From the properties of Input parameter in the Properties pane.

67.What is Hierarchy?
We create hierarchies between attributes to improve analysis by displaying attributes according to their defined relationships. There are two types of hierarchies:

Level Hierarchy: The root and child nodes are accessed only in the defined order. It consists of one or more levels of aggregation.
Example: We can drill down from Country to State and to City etc.

Parent/Child Hierarchy: This hierarchy contains a parent attribute and constructed from a single parent attribute.
Example: Employee master (employee and manager).

68.How to create an hierarchy for Analytic view?
Hierarchy is not supported in Analytic view but can be used only in Attribute view and Calculation view.

69.While creating hierarchy, what does the option ‘Aggregate All Nodes’ mean?
For example there is a member A with value 100, A1 with value 10, A2 with value 20 where A1 and A2 are children of A. By default the option ‘Aggregate All Nodes’ is set to false and you will see a value of 30 for A. When this option is set to true, you will count the posted value 100 for A as well and see a result of 130.

70.How can you generate a Sales report for a region in a particular currency where you have the sales data in a database table in a different currency?
Create an Analytic view by selecting the table column containing the sales data and currency and perform currency conversion. Once the view is activated, we can use it to generate reports.

71.What are the factors that affect currency conversion?
Currency conversion is performed based on source currency, target currency, exchange rate, and date of conversion. You can select currency from the attribute data used in the view. Currency conversion is enabled for Analytic view and Calculation views.

72.What is the prerequisite for doing the currency conversion?
You need to import tables TCURC, TCURF, TCURN, TCURR, TCURT, TCURV, TCURW & TCURX.

73.What is the prerequisite for Unit of Measure?
You need to import the tables T006 & T006A.

74.What happens when you activate an object?
The object is exposed to repository and for analysis.

75.What is the difference between Activate and Redeploy?
Activate – It deploys the inactive objects.
Redeploy – It deploys the active objects. You do this when run-time object is corrupted or deleted and you want to create it again. OR when the object goes through client-level activation and server-level activation but fails at MDX, and the object status is still active.

76.What are the supported activation modes?
Activate and Ignore the inconsistencies in impacted objects
Stop activation in case of inconsistencies in impacted objects.

Irrespective of the activation mode, if even one of the selected objects fails (either during validation or during activation), the complete activation job fails and none of the selected objects will be activated.

77.Can you explain the behavior of activation job?
The status of the activation job indicates whether the activation of the objects is successful or failed.
In case of failure (status is completed with errors) the process is rolled back and none of the objects are activated
In the summary part the job log shows success, even in the case of failure. This is to help the user to indicate that those objects were successfully activated without any issues.
When you open the job log, the summary list only shows those objects that are submitted for activation. It does not list all the affected objects. They are listed in detail section.

78.What is a Decision table?
It creates related business rules in a tabular format for automating the decisions. It helps in managing business rules, data validation, data quality rules without any language knowledge. The active version of the decision table can be used in applications.

You create decision table in a package just like any attribute view. You can create from scratch or from an existing decision table.

79.Where to see the detailed report of the decision table?
In the ‘Job Log’ section you can see the validation status and detailed report of the decision table.

Leave a Reply

Your email address will not be published. Required fields are marked *