+ All Categories
Home > Documents > SAP HANA Modeling Guide

SAP HANA Modeling Guide

Date post: 22-Sep-2014
Category:
Upload: jwheimans
View: 147 times
Download: 9 times
Share this document with a friend
Popular Tags:
46
SAP HANA Modeling Guide SAP In-Memory Appliance (SAP HANA) 1.0 2011-06-23
Transcript
Page 1: SAP HANA Modeling Guide

SAP HANA Modeling Guide■ SAP In-Memory Appliance (SAP HANA) 1.0

2011-06-23

Page 2: SAP HANA Modeling Guide

© 2011 SAP AG. All rights reserved.SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAPBusinessObjects Explorer, StreamWork, and other SAP products and services mentioned herein as

Copyright

well as their respective logos are trademarks or registered trademarks of SAP AG in Germany andother countries.Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports,Crystal Decisions, Web Intelligence, Xcelsius, and other Business Objects products and servicesmentioned herein as well as their respective logos are trademarks or registered trademarks of BusinessObjects Software Ltd. Business Objects is an SAP company.Sybase and Adaptive Server, iAnywhere,Sybase 365, SQL Anywhere, and other Sybase products and services mentioned herein as well astheir respective logos are trademarks or registered trademarks of Sybase, Inc. Sybase is an SAPcompany. All other product and service names mentioned are the trademarks of their respectivecompanies. Data contained in this document serves informational purposes only. National productspecifications may vary.These materials are subject to change without notice. These materials areprovided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only,without representation or warranty of any kind, and SAP Group shall not be liable for errors oromissions with respect to the materials. The only warranties for SAP Group products and servicesare those that are set forth in the express warranty statements accompanying such products andservices, if any. Nothing herein should be construed as constituting an additional warranty.

2011-06-23

Page 3: SAP HANA Modeling Guide

Contents

Concepts.................................................................................................................................5Chapter 1

Information Models..................................................................................................................51.1Attributes and Measures..........................................................................................................51.2Hierarchies...............................................................................................................................71.3Users and Roles......................................................................................................................81.4

Overview of Modeling Data....................................................................................................9Chapter 2

Creating Information Objects................................................................................................11Chapter 3

Creating a Package................................................................................................................113.1Creating an Attribute View.....................................................................................................123.2Creating an Analytic View......................................................................................................153.3Creating a Calculation View ..................................................................................................173.4Managing Attribute Mappings................................................................................................203.4.1Constant Column...................................................................................................................203.4.2Creating an Analytic Privilege.................................................................................................213.5Creating Function using SQL the Function Editor...................................................................233.6Creating Calculated Attributes...............................................................................................243.7Using Currency as Unit of Measure.......................................................................................243.8Activating Impacted Objects ..................................................................................................253.9

Processing Models...............................................................................................................27Chapter 4

Validating Information Models ...............................................................................................274.1Comparing Object Versions...................................................................................................284.2Checking Model References..................................................................................................284.3Displaying Audit Trails of Information Models.........................................................................284.4

Importing Metadata...............................................................................................................31Chapter 5

Mass Import of Metadata ......................................................................................................315.1Selective Import of Metadata.................................................................................................325.2

2011-06-233

Page 4: SAP HANA Modeling Guide

Provisioning Data..................................................................................................................35Chapter 6

Managing Modeling Content................................................................................................37Chapter 7

Setting Up the Information Modeler.......................................................................................377.1Configuring Data Services for Metadata Import......................................................................387.1.1Configuring the Information Modeler......................................................................................397.1.2Creating Schemas..................................................................................................................407.2Manage Schema Mapping......................................................................................................417.3Migrating Calculation Views...................................................................................................417.4Importing and Exporting Models.............................................................................................427.5Creating Delivery Unit............................................................................................................427.5.1Exporting Models (Server)......................................................................................................437.5.2Importing Models (Server)......................................................................................................437.5.3Exporting Models (Client).......................................................................................................447.5.4Importing Models (Client).......................................................................................................447.5.5Copying Objects....................................................................................................................457.6

2011-06-234

Contents

Page 5: SAP HANA Modeling Guide

Concepts

1.1 Information Models

Information models are used to create multiple views of transactional data that can be used for analyticalpurposes. Information models are the combination of attributes and measures.

For example, Analyze the sales of a product in a particular region during the first quarter

Users can design models by limiting the view only to the information required for analysis and later drill-down for detailed information. Following are the different types of models you can create:

Attribute ViewAttribute views are the reusable dimensions or subject areas used for business analysis.

For example, Time, Account, Product.

Analytic ViewAnalytic views are the multidimensional views or OLAP cubes. Using analytic views you analyze valuesfrom single fact table that is based on the related attributes from the data foundation and attribute views.

For example, Sales of a product in given period.

Calculation ViewCalculation view are used to create your own data foundation using database tables, attribute views,analytic views and calculation views to address a complex business requirement.

For example, Compare the sales of product in a particular region for the last two years.

1.2 Attributes and Measures

AttributesAttributes are individual non-measurable analytical elements.

• Simple Attributes

2011-06-235

Concepts

Page 6: SAP HANA Modeling Guide

Simple Attributes are individual non-measurable analytical elements that are derived from the datafoundation

For example, PRODUCT_ID, PRODUCT_NAME are attributes of a PRODUCT subject area.

• Calculated Attributes

Calculated attributes are derived by one or more existing attributes or constants.

For example, Deriving the full name of a customer (first and last name), assigning a constant valueto an attribute which can be used for arithmetic calculations.

• Private Attributes

Private attributes are used to model analytic views and can't be used outside the view. Privateattributes are required to link to the subject area or attribute views. Private attributes add moreinformation to the model.

For example, You create an analytic view ANV to analyze the sales of cold-drink A in west region.

And you selected A as a private attribute from the database table cold-drinks. Then, this A could be

used only for modeling data for ANV.

MeasuresMeasures are simplemeasurable analytical elements. Measures are derived from analytic and calculationview.

• Simple Measures

A simple measure is a measurable analytical element that is derived from the data foundation.

For example, PROFIT.

• Calculated Measure

Calculated measures are defined based on a combination of data from OLAP cubes, arithmeticoperators, constants, and functions.

For example, The total sales of a product across five regions, assigning a constant value to a measurefor some calculation.

• Restricted Measure

Restricted measures are used to filter the value based on the user defined rules on the attributevalues.

Note:

You can choose to hide the attributes and measures that are not required for client consumption.

For example: For a complex calculation that is derived from a series of computations, you can hide thedifferent levels of computations that are not required for reporting purposes.

2011-06-236

Concepts

Page 7: SAP HANA Modeling Guide

1.3 Hierarchies

Hierarchies are used to structure and define the relationship between attributes of attribute views thatare used for business analysis. It becomes easy to generate report based on exposed models thatconsists of attributes in hierarchy.

For example, consider the TIME attribute view having YEAR, QUARTER and MONTH attributes. UsingYEAR, QUARTER and MONTH attributes a hierarchy can be defined for the TIME attribute view asfollowing:

Following types of hierarchies are supported:• Level Hierarchy

Level Hierarchies are hierachies which are of rigid in nature where in the root and the child nodescan be accessed only in the defined order. For example, consider the case of Address, OrganizationSturcture etc

• Parent Child Hierarchy

Value Hierarchies are hierarchies which are very similar to BOM (Parent and Child) and EmployeeMaster(Employee andManager) . The Hierachy can be explorer based on selected Parent and thereare cases where the Child can be a Parent too. This Hierarchy is derived based on the Value.

2011-06-237

Concepts

Page 8: SAP HANA Modeling Guide

1.4 Users and Roles

Users and roles are assigned to create and modify content in the information modeler perspective. Formore information, refer to http://help.sap.com/hana -> SAP HANA Administration and Security-> seesection SAP HANA Users, Roles and Authorizations.

There are two type of users having roles specific to modeling activities as follows:• SAP_TEMPLATE_MODELING

This is used as template role that can be used to create users to work on content

• SAP_TEMPLATE_CONTENT_ADMIN

This is used as template role for those users who are responsible for managing repository contenton a higher level and managing teams who develop and test the content.

Users with this role are able to perform the following:

• Maintain delivery units

• Export and Import content

• Create, update, delete on active native and imported packages and objects in such packages.Also, they will be able to grant all these privileges to other users.

2011-06-238

Concepts

Page 9: SAP HANA Modeling Guide

Overview of Modeling Data

You use the SAP In-Memory Computing studio for modeling data. It allows users to create or modifyexisting models of data.

The figure below shows the process flow for modeling within SAP HANA.

Prerequisites• You have installed all SAP HANA components that are necessary for enabling data replication. For

information about installing SAP HANA, see SAP HANA 1.0 Installation Guide• The information modeler perspective is part of the SAP In-Memory Computing studio and will be

installed together with the IMC studio, as described in SAP In-Memory Database 1.0 – StudioInstallation and Update Guide

• You have configured all SAP HANA components that are necessary for enabling data replication.For more information see Configuring Data Replication section in SAP HANA 1.0 Master Guide

TasksThe tasks that you can perform in the Information Modeler are grouped as follows:

Creating Information ObjectsYou need to create information objects in the information modeler perspective. More information:Creating Information Objects

2011-06-239

Overview of Modeling Data

Page 10: SAP HANA Modeling Guide

Processing ModelsMore information: Processing Models

Managing Modeling ContentYou can perform multiple administration activities in the information modeler perspective of the SAPIn-Memory Computing studio. More information: Managing Modeling Content

Importing the MetadataYou need to import the table definitions in the information modeler perspective. Moreinformation:Importing Metadata

Provisioning DataYou need to load data into the table definitions in the information modeler perspective. Moreinformation:Provisioning Data

Note:You can use the features offered by the information modeler only if, the information modeler version iscompatible with the appropriate server version.

2011-06-2310

Overview of Modeling Data

Page 11: SAP HANA Modeling Guide

Creating Information Objects

You create information objects to model data that needs to be used for business analytics.

Procedure

1. Create an Attribute ViewMore information: Creating an Attribute View

2. Create an Analytic ViewMore information: Creating an Analytic View

3. Create a Calculation ViewMore information: Creating a Calculation View

4. Create an Analytic PrivilegeMore information: Creating an Analytic Privilege

Note:To create, read, edit, delete, activate, and maintain an information object or package, you must haverepository authorization at package level.

3.1 Creating a Package

You use package to group together information objects pertaining to a user.

Procedure1. From the Quick Launch page, choose Package.2. Enter the name and a description of the package.3. From the drop-down list, select the delivery unit with which you want to associate the package for

exporting models to the server.4. Choose OK.

2011-06-2311

Creating Information Objects

Page 12: SAP HANA Modeling Guide

3.2 Creating an Attribute View

You create an attribute view to represent the master data tables. Attributes of the master data can bemodeled using attribute views.

The following picture shows the workflow for an attribute view:

Procedure

1. Set Parameters for the Attribute View1. In the Information Modeler perspective, expand the system node in the Navigator pane.2. Expand the Content node.3. Select the required package.4. From the context menu choose, New > Attribute View

a. Enter the name and description of the attribute view.b. Select the required package.c. Select the attribute view type as follows:

• If you know the tables and attributes to be used to create the view, choose Standard andproceed as follows:1. Choose Next.2. Select the tables from the list.3. Choose Add.4. Choose Finish.

• To create a master data table based on time characteristics, choose Time and proceed asfollows:1. Select the Calendar Type:

• If the granularity for the data to be generated is of DATE or YEAR level, selectGregorian.

• If the fiscal variants are not aligned with the calendar periods, Fiscal.

2011-06-2312

Creating Information Objects

Page 13: SAP HANA Modeling Guide

Note:For reporting purposes, you use different calendars with fiscal variants. These fiscal variantsmay not be aligned with calendar periods.

2. Select the granularity or fiscal variant based on the calendar type.3. Choose Next.4. Select the tables from the list.5. Choose Add.6. Choose Finish.

• If you want to create an attribute view from an existing one so that it works as an alias to theexisting attribute view, choose Derived and proceed as follows:1. Select the required model.2. Choose Finish.

Note:The derived attribute view refers to the attributes of the existing one. Any changes made tothe existing attribute view are be reflected in the derived attribute view. The derived attributeview is read-only.

• If you want to create an attribute view from an existing model with some changes to it, chooseCopy From, and proceed as follows:1. Select the required model.2. Choose Finish.

Result: The Data Foundation pane is poulated with the selected tables to build the attribute view.

2. Adding Tables• If you want to add more tables, choose the Add table icon. Search for the required table in the Find

Table dialog.• To filter the list of tables in a schema, drag and drop the tables from theNavigator pane by performing

the following steps:1. Expand the Default Catalog node under the system node.2. Expand the required schema node.3. Select the Tables node.4. From the context menu, choose Filter

a. In the Filter dialog, enter the table name you want add to your view.b. Choose OK. The Tables node is populated with the filtered list of tables.

5. Drag and drop the required tables in the Data Foundation pane.

3. Adding Table Joins (Optional)You can define the join conditions and cardinality between tables added in the view.

4. Select AttributesYou have to define the output structure of the view by performing the following:1. Select the required field from the table.2. From the context menu, do the following:

2011-06-2313

Creating Information Objects

Page 14: SAP HANA Modeling Guide

a. To set a field as a key attribute, choose Add as Key Attribute

Note:You have to define atleast one key attribute for the output structure.

b. To set a field as an attribute, choose Add as Attribute

Note:You can define any number of non-key attributes.

c. To define static filter values for a field, choose ApplyFiltera. In the Apply Filter dialog, choose the required operator.b. Enter the filter value.

Note:

• You can create calculated attributes using existing attributes. More information : CreatingCalculated Attributes

• You can choose to hide the attributes that are not required for client consumption by assigningvalue true to the property Hidden in the properties pane.

3. To set description mapping, select the attribute from the Output pane.4. Navigate to the Properties tab page.5. In the Description Mapping property, choose the relevant value.

Note:You can hide any attribute from data preview by setting it as hidden from the properties tab page.

5. Create HierarchyYou can define a level or parent-child hierarchy for the attributes added to the output structure.1. Navigate to the Hierarchies tab page.2. To create a hierarchy, choose Create.

a. Enter the name and description for the hierarchy.b. Choose the Hierarchy Typec. Choose OK.

3. Drag and drop the attributes from the Output pane.

6. Activate the ViewBefore a view is available for reporting purposes, you have to deploy/activate the view. The activationof the view translates the metadata defined in the information model to a database object.1. To save the attribute view, choose File > Save2. From the context menu of the attribute view, choose Activate.

Note:To activate the objects which reuse the view, and the objects reused by the view, choose CascadeActivate from the context menu of the view. More information: Activating Impacted Objects

7. Data PreviewYou can verify the contents of the model you have created by previewing the data.1. From the context menu of the attribute view, choose Data Preview

2011-06-2314

Creating Information Objects

Page 15: SAP HANA Modeling Guide

2. You can preview data in any of the following formats:• Raw Data: Standard table format of data• Distinct Values: Graphical representation of data• Analysis: Display attributes and measures in a graphical format

3.3 Creating an Analytic View

Analytic View is the consumable object that is a combination of attribute view and facts where factscome from one table.

The following picture shows the workflow for analytic view:

Procedure

1. Set Parameters for the Analytic View1. In the Information Modeler perspective, expand the system node in the Navigator pane.2. Expand the Content node.3. Select the required package.4. From the context menu choose, New > Analytic View5. Enter the name and description of the analytic view.6. You can do any one of the following:

a. To create an analytic view, select Create New option.b. To create an analytic view from an existing model, select Copy From option. You can choose

models from all packages including the current package.7. Choose Next.8. Enter the table you want to search for.9. Select the table(s) from the list.10. Choose Add.11. Choose Next.12. Enter the attribute view you want to search for.13. Select the attribute view from the list.14. Choose Add.

2011-06-2315

Creating Information Objects

Page 16: SAP HANA Modeling Guide

15. After you have added the attribute view(s) to the analytic view, choose Finish. TheData Foundationpane is populated with the selected tables, and the user can build the analytic view.

2. Adding Tables• To add more tables, choose the Add table icon. You can search for the required table in the Find

Table dialog.• To filter the list of tables in a schema, you can drag and drop the tables from the Navigator pane

by performing the following steps:1. Expand the Default Catalog node under the system node.2. Expand the required schema node.3. Select the Tables node.4. From the context menu, choose Filter

a. In the Filter dialog, enter the table name you want add to your view.b. Choose OK. The Tables node is populated with the filtered list of tables.

5. Drag and drop the required tables in the Data Foundation pane.

3. Adding Table Joins (Optional)You can define the join conditions and cardinality between tables added in the view.

4. Select Attributes and MeasuresYou have to define the output structure of the view by performing the following:1. Select the required field from the table.2. From the context menu, do the following:

a. To set a field as attribute, choose Add as Attribute.

Note:

• You have to define atleast one attribute for the output structure.• The attributes added, are private attributes to the analytic view.

b. To set a field as a measure, choose Add as Measure.

Note:You must define atleast one measure.

Note:

• To create calculated attributes please refer to Creating Calculated Attributes• You can choose to hide the attributes and measures that are not required for client consumption,

by assigning value true to the property Hidden in the properties pane.

5. Create Calculated Measures1. In the Output pane, select Calculated Measures.2. From the context menu, choose New.

a. Enter the name and description of the calculated measure.b. Select the required Aggregation Type.c. Choose Hidden, if you want to hide the measure while previewing data.d. Select the required data type.

2011-06-2316

Creating Information Objects

Page 17: SAP HANA Modeling Guide

e. Enter the length and scale.f. Define the measure by selecting the required measure(s),operator and function.g. Choose Validate.h. Choose OK.

Note:To associate currency as unit of measure, please refer to Using Currency as Unit of Measure

6. Create Restricted Measures1. In the Output pane, select Restricted Measures2. From the context menu, choose New

a. Enter the name, aggregation type, and a description of the restricted measureb. Choose the measure from the drop-down list

a. To add a restriction, choose Add Restriction.b. Choose the required parameter, operator, and valuec. Choose OK.

c. In the Apply Filter dialog, choose the required operatord. Enter the filter value.

7. Activate the ViewBefore a view is available for reporting purposes, you have to deploy/activate the view. The activationof the view translates the metadata defined in the information model to a database object.1. To save the attribute view, choose File > Save2. From the context menu of the attribute view, choose Activate.

Note:To activate the objects which reuse the view and the objects reused by the view, choose CascadeActivate from the context menu of the view. More information: Activating Impacted Objects

8. Data PreviewYou can verify the contents of the model you have created by previewing the data.1. From the context menu of the attribute view, choose Data Preview2. You can preview data in any of the following formats:

• Raw Data: Standard table format of data• Distinct Values: Graphical representation of data• Analysis: Display attributes and measures in a graphical format

3.4 Creating a Calculation View

You create calculation view when business use case demands for complex business logic. For queriesthat invlove more than one analytic view or table you use calculation view. Using calculation views youderive values and Key Performance Indicators(KPIs).

2011-06-2317

Creating Information Objects

Page 18: SAP HANA Modeling Guide

PrerequisiteYou have set the calculation scenario to New Calculation Scenario. More information: <<link to setup>>

Procedure

1. In the Information Modeler perspective, expand the system node from the Navigator pane.2. Expand the Content node.3. Select the required package.4. From the context menu choose, New > Calculation View.

a. Enter the name and description of the calculation view.b. Select the required package.

Create Script-based Calculation View1. Choose SQL Script.2. Select the required schema.3. Choose Finish.

Define the Output Structurea. Choose Define Output Parameter from the output pane.b. Add the output parameter(s) with the required datatype and length.c. Choose OK.

Define the Functiona. Define the function using SQL Script commands.

Save and Activatea. To save the view, choose File > Save.

b. From the context menu of the calculation view, choose Activate.

Note:To activate the objects which reuse the view and the objects reused by the view, chooseCascadeActivate from the context menu of the view. More information: Activating Impacted Objects

Create Graphical Calculation View1. Choose Graphical

Set the Input Parametersa. Follow the instructions on the wizard to select the required tables and information models.

Adding Unions/Joins/ Projectiona. From the Tools Palette, choose the required property.

Note:

• The input for Union, Join and Projection views can consist of data sources, union, join, orprojection views.

• You can have a maximum of two sources of input for Union and Join Views.• You can have only one source of input for Projection View.

2011-06-2318

Creating Information Objects

Page 19: SAP HANA Modeling Guide

b. Map the input to the selected property.

Mapping attributesa. To map attributes in a Union view, drag and drop the required attributes from Source to

Target.

Additionally, you can modify the attribute mapping. More information: Managing AttributeMappingsTo create a system generated mapping, choose Auto Map By Name.

b. To map attributes in a Join view, join the required attributes.

Note:

• The output of Union View are the attributes that you add at the target.• The output of the Join View are the joined . However, to add additional attributes to output,

from the context menu, choose Add to Output.• To add attributes of projection view to output, choose Add to Output from the context

menu.

Creating Calculated Columns(optional)

The output of Union,Join or Projection view is stored as column in the output pane.To performcalculation on these columns perform the following steps:1. Select the Calculated Columns node.2. From the context menu, choose New.

a. Enter the name.b. Select the data type.c. Enter the length and scale.d. To perform calculation on the output columns, perform one of the following:

• If you know how to write the formula, enter the expression to perform calculation or• From the list, select the required elements, operator and functions.

e. Choose Add.

Adding Attributes and Measures to Calculation View Outputa. From the workflow pane, choose the Output node.b. To add attribute, from the context menu , choose Add as Attribute.c. To add measure, from the context menu , choose Add as Measure.d. To create calculated attributes perform the following steps:

a. In the Output pane, select Calculated Measures.b. From the context menu, choose New.

a. Enter the name and description of the calculated measure.b. Select the required Aggregation Type.c. Choose Hidden, if you want to hide the measure while previewing data.d. Select the required data type.e. Enter the length and scale.f. Define the measure by selecting the required measure(s),operator and function.g. Choose Validate.

2011-06-2319

Creating Information Objects

Page 20: SAP HANA Modeling Guide

h. Choose OK.

Note:You can choose to hide the attributes andmeasures that are not required for client consumptionby assigning value true to the property Hidden in the properties pane.

Save and Activatea. To save the calculation view, choose File > Save.b. From the context menu of the Calculation View, choose Activate.

Note:To activate the objects which reuse the view and the objects reused by the view, chooseCascade Activate from the context menu of the view. More information: Activating ImpactedObjects

3.4.1 Managing Attribute Mappings

You use this procedure to map the target attribute with the source attribute if there is a big list of attributesor to assign a constant value to the target attribute.

Procedure1. Select the attribute in the target list.2. From the context menu, choose Manage Mappings.

a. To map target column with the source, select the required source from the dropdown.b. To assign a default value to the constant column, enter value in the Constant Value. More

information: Constant Columnc. Choose OK• To associate the target column with the source column, select source from the dropdown.•

3.4.2 Constant Column

In union view, if any attribute at the target or output is present for which a mapping with the sourceattribute is not done, aConstant Column is created. The default value for the constant column is NULL.

Note:The target attribute is mapped with both the sources i.e. every target attribute will have two mappingseither with the source or using constant columns.

For example,

2011-06-2320

Creating Information Objects

Page 21: SAP HANA Modeling Guide

Consider at source there are two Database tables A and B. Table A has 3 columns X, Y and Z. B hastwo columns X and X’. Now, if target consists of X,Y,Z and X’ such that there is a mapping for X and Yfrom A but not from B. Then, constant columns(with NULL values) will be created for X,Y Z and X’ andmapping for these columns are as following:

X->A.X, B.NULL

Y->A.Y, B.NULL

Z->A.NULL, B.NULL

X’-> A.NULL, B.NULL

3.5 Creating an Analytic Privilege

You apply analytic privileges when business users access values with certain combinations of dimensionattributes. You can use analytic privileges to partition data among various users sharing the same datafoundation.You can assign analytic privileges in two ways:

1. Privileges for Selected Information ModelsYou can define restrictions for a selected group of models.

Example:

You have defined a restriction on an attribute CUST_ID that belongs to the CUSTOMER attributeview. The restriction is applicable to all the selected information models that use this attribute view.

2. Privileges for All Information ModelsYou can define restrictions for all information models across multiple packages that are specific to auser.

Example:

You have defined a restriction on an attribute view CUSTOMER that belongs to the SALES packageand the user EMP. The restriction is applicable to all information models across multiple packagesthat use CUSTOMER and that are specific to EMP.

Note:

The restrictions that you set for attributes belonging for attribute views also apply to analytic andcalculation views, if the same attribute is reused. However, the restrictions set for attributes belongingto either analytic or calculation views apply only to the analytic or calculation views, if the same attributeis reused.

2011-06-2321

Creating Information Objects

Page 22: SAP HANA Modeling Guide

Procedure

1. Set Parameters for the Analytic Privilege1. In the Information Modeler perspective, expand the system node from the Navigator pane.

2. Expand the Content node.

3. Select the required package.

4. From the context menu, choose New > Analytic Privilege.a. Enter the name and description of the analytic privilege.b. Choose Next.c. Select the required information model(s).

d. Choose Adde. Choose Finish.

Note:You can choose to add more information models in the editor pane.

2. Add Attributes1. If you want to add restrictions for all information models, select the Applicable to all Information

Models checkbox.

Note:If you do not select this option, the restrictions you create apply only to the secured list of models.

2. In the Associated Attributes Restrictions pane, choose Add.3. Select the attribute(s) for which you want to apply the restriction.4. Choose OK.

Note:If you do not add any attributes for restrictions then it means unrestricted access to the selected/allinformation models, depending on the status of the check-box.

3. Assign Restrictions1. In the Assign Restrictions pane, choose Add2. You can choose to change the value defined for Operator.3. You can choose to enter a value or use the Value Help Dialog to search for a value.

Note:To activate the analytic privilege, you must assign a minimum of one restriction to each attribute .

4. ActivateBefore associating a user with an analytic privilege, it needs to be activated. To activate an analyticprivilege, choose Activate from the context menu.

Note:To activate the objects which reuse the analytic privilege, and the objects reused by the analytic privilege,choose Cascade Activate from the context menu. More information: Activating Impacted Objects

2011-06-2322

Creating Information Objects

Page 23: SAP HANA Modeling Guide

5. View Users and Roles1. To view the users and roles assigned to the analytic privilege, choose Users/Roles tab page.

3.6 Creating Function using SQL the Function Editor

You use SQL Function editor to create functions that can be resused by other information objects.

Note:You can create functions only in the _SYS_BIC schema.

Procedure1. Set Parameters for the function1. On the Quick Launch page, choose Procedure.2. Enter the name and description of the function.3. Select the required package.4. Choose Finish.

2. Define Function1. In the function editor pane write the script for the function.

Note:

• Use the following data types for the function parameters

Input Parameter - Table or Scalar

Output Parameter - Table• Only one function can be written in the function body. However, you can refer to other functions in

the function body.

3. Activate the FunctionBefore a function is available for reporting purposes, you have to activate the function.1. To save the function, choose File > Save2. From the context menu of the function, choose Activate.

Note:To activate the objects which reuse the procedure, and the objects reused by the procedure, chooseCascade Activate from the context menu. More information: Activating Impacted Objects

Note:To create, read, edit, delete, activate, and maintain procedure(s), you must have repository authorizationat package level.

2011-06-2323

Creating Information Objects

Page 24: SAP HANA Modeling Guide

3.7 Creating Calculated Attributes

You use calculated attributes to derive some meaningful information, in the form of attributes, fromexisting attributes and measures.

For example, if you have attributes corresponding to last name and first name but you want an attributeto show the full name(first name and last name) then you can use a calculated attribute to derive this.

Procedure1. In the output pane, select Calculated Attributes.2. From the context menu, choose New.3. Enter the name and description of the calculated attribute.4. In the Key tab pane perform the following to define the formula for the calculated attribute:

a. Select the data type for the calculated attribute from the dropdown list.b. Enter the length and scale.c. Select the required attributes, operator and function.d. To check for the validity of the formula, choose Validate.e. Choose Add.

5. To add a Description to the calculated attribute, write the formula as above.

3.8 Using Currency as Unit of Measure

You use this procedure to qualify a measure as an amount in the analytical space.

Note:Currency is supported only for Calculated Measures.

Procedure1. In the Calculated Measure dialog, choose the Currency tab.2. Choose the target currency for the calculated measure as follows:

a. Open the Currency dialog.b. Select the currency based on the type selected from the dropdown list.c. c. Choose OK.

3. If you want to convert the value, choose Enable for Conversion.a. Select the source currency.b. Select the exchange type.c. Select the date for conversion.

2011-06-2324

Creating Information Objects

Page 25: SAP HANA Modeling Guide

3.9 Activating Impacted Objects

You use this procedure to activate an object and it's dependent objects (parent and child).

Example:

Consider four objects A,B,C and X, such that, A is based on X, B uses A and C uses B. Now, if youactivate A, then all the four objects get activated.

Procedure1. In the Navigator pane, select the required object.2. From the context menu, choose Cascade Activate. A pre-populated list of impacted objects is

shown on the right list pane.a. To add more objects for activation, select the required objects.b. Choose Add.c. Choose Activate.

2011-06-2325

Creating Information Objects

Page 26: SAP HANA Modeling Guide

2011-06-2326

Creating Information Objects

Page 27: SAP HANA Modeling Guide

Processing Models

You can perform any of the following tasks on models under Information Modeler perspective.

ProcedureValidate Information ModelsMore information: Validating Information Models

Compare Object VersionsMore information: Comparing Object Versions

Check Model ReferencesMore information: Checking Model References

Track Activation and Version HistoryMore information: Displaying Audit Trails of Information Models

4.1 Validating Information Models

You use this procedure to perform consistency checks on information models, as a preparatory stepduring activation. These checks are based on validation rules set for information models and theunderlying objects.

For example, the "Table validity rule " checks if the table is still available and whether it is of the typeCOLUMN STORE.

Procedure1. Select Validation Rules1. From theWindow menu, choose Preferences.2. Expand the Information Modeler node.3. Choose Validation Rules.4. Select the required rules.5. Choose Apply.6. Choose OK.

Note:Validation rules with the severity Error are mandatory.

2011-06-2327

Processing Models

Page 28: SAP HANA Modeling Guide

2. Validate Information Models1. From the Quick Launch page, choose Validate2. From the Available list, select the required information model(s).3. Choose Add.4. Choose Validate.

A validation log is generated, which you can use to view the status of each rule in the ValidationLog view.

4.2 Comparing Object Versions

While modifying an information model, you can compare the edited version with the active version.

Procedure1. In the Information Modeler perspective, expand the system node from the Navigator pane.2. Expand the Content node.3. Select the required package.4. Select the required object5. To modify the object, choose Open from context menu.6. In the editor pane, choose Show Active Version.

4.3 Checking Model References

You use this procedure to identify whether an information model is referenced by any other informationmodel(s).

Procedure1. In the Information Modeler perspective, expand the system node in the Navigator pane.2. Expand the Content node.3. Expnad the required package node.4. Select the required object.5. From the context menu, chooseWhere Used.

4.4 Displaying Audit Trails of Information Models

2011-06-2328

Processing Models

Page 29: SAP HANA Modeling Guide

You use this procedure to track activation and version details of an information model.

Note:When you activate an information model, it gets updated with a new version.

Procedure1. In the Information Modeler perspective, expand the system node from the Navigator pane.2. Expand the Content node.3. Expand the required package.4. Select the required model.5. From the context menu, choose Audit Trail.

2011-06-2329

Processing Models

Page 30: SAP HANA Modeling Guide

2011-06-2330

Processing Models

Page 31: SAP HANA Modeling Guide

Importing Metadata

You use this procedure to import table definitions from a source system into the target system.

Procedure

1. Creating SchemasMore information: Creating Schemas

2. Mass Import of MetadataMore information: Mass Import of Metadata

3. Selective Import of MetadataMore information: Selective Import of Metadata

5.1 Mass Import of Metadata

You use this prodedure to import all table definitions from the source SAP ERP system to the SAPIn-Memory Computing studio.

Note:Only tables that are stored in repositories supported in accordance with the current SAP HANA PAMcan be imported.

PrerequisiteYou have installed the Load Controller.

Procedure1. From the File menu, choose Import.2. Expand the Information Modeler node.3. Choose Mass Import Source Objects.4. Choose Next.5. Select the target system where you want to import all the table definitions.6. Choose Next.7. In theConnection Details dialog, enter the OSUser and Password for the target SAPHANA system.8. Choose Finish.

2011-06-2331

Importing Metadata

Page 32: SAP HANA Modeling Guide

Result: All the table definitions are imported to the SAP In-Memory Computing studio.

5.2 Selective Import of Metadata

You use this procedure for importing only selected table definitions from a source system to the SAPIn-Memory Computing studio. You can only import selected table definitions by using the Data Servicesinfrastructure.

PrerequisiteYou have configured the Data Services system in the information modeler. More information: Configuringthe Information Modeler

Procedure1. From the File menu, choose Import2. Expand the Information Modeler node3. Choose Source Objects4. Choose Next5. Select the target system where you want to import the metadata6. Choose Next7. Select the Source System for import as following:

a. To use an existing source connection, select one from the drop-down list.b. To add or edit a source connection, choose Manage Connection

a. Enter the name and description of the connection.b. Enter the Application Server details.c. Enter the username and password.d. Enter the passphrase.e. Enter the Client and System Numberf. To test the connection, choose Testg. Save the connection details.h. To view details about an existing connection, double-click it in the Existing Connection pane.i. To clear the connection details, choose Add.j. Choose Close.

8. Choose the type of object to import.9. Choose Next10. Enter the table/extractor name you want to search for.11. Select the required table/extractor from the list12. Choose Add

Note:To add dependent tables of the selected tables, select the tables in the Target pane and chooseAdd Dependent Tables

13. Select the schema where you want to import the metadata.

2011-06-2332

Importing Metadata

Page 33: SAP HANA Modeling Guide

Note:If the object type is extractor, select the package.

14. Choose Next.15. To validate and edit object properties, perform the following:

a. To change the storage type of the object, choose the Storage Type cell and select the requiredvalue from the drop down.

b. To validate the changes, choose Validatec. To edit the Name, Primary Key, Description, and Nullable properties, choose the respective

field and edit it.16. Choose Next17. Review the summary and choose Finish.

Result: Based on the pre defined set of rules, system will create the selected source object either asa physical table or as an information model (attribute view, analytic view and calculation view).

2011-06-2333

Importing Metadata

Page 34: SAP HANA Modeling Guide

2011-06-2334

Importing Metadata

Page 35: SAP HANA Modeling Guide

Provisioning Data

You use this procedure to load data into tables using the Load Controller, Sybase Replication Serverand SAP Landscape Transformation (SLT) infrastructure. You can do this in the following ways:• Using the Load Controller, you can load all data from the source ERP system to the SAP HANA

In-Memory Database for the selected tables.• Using the Sybase Replication Server, you can maintain the data upto date with the source system

tables for the selected tables• Using the SLT based replication, you can load and maintain the data upto date with the source

system tables for the selected tables.

For more information on replication technologies, see SAP HANA Replication Technologies section inSAP HANA 1.0 Master Guide

Prerequisites• If you are using Load Controller or Sybase Replication Server infrastructure, make sure that you

have imported all table definitions into the SAP HANA In-Memory Database. More information:MassImport of Metadata

• If you are using the SLT component,the source system(s), target system and the target schema,are configured by the administrator during the installation.

Procedure1. From the Quick Launch page, choose Data Provisioning.2. If you are using SLT based replication, choose Source.3. Load data using the appropriate procedure:

Initial Load1. Choose Load.2. Search for the required tables.3. Select the tables from the Available list.

4. Choose Add.

5. If you are using Load Controller infrastructure, once you have added all the tables, choose Next,and enter operating system user name and password.

6. Choose Finish.

Data Replication1. Choose Replicate.2. Search for the required tables.3. Select the tables from the Available list.

2011-06-2335

Provisioning Data

Page 36: SAP HANA Modeling Guide

4. Choose Add.

5. If you are using Sybase Replication Server infrastructure, once you have added all the tables, chooseNext, and enter operating system user name and password.

6. Choose Finish.

2011-06-2336

Provisioning Data

Page 37: SAP HANA Modeling Guide

Managing Modeling Content

7.1 Setting Up the Information Modeler

You use this procedure to perform configuration steps in the information modeler perspective of theSAP In-Memory Computing studio. You can also import table definitions and load data that can laterbe used to define information models.

Procedure1. Start the information modeler perspective1. From the desktop, choose Start > Studio2. ChooseWindow > Open Perspective > Other3. Choose Information Modeler4. Choose OK

2. Add a System1. Navigate to the Navigator pane2. From the context menu, choose Add System.

a. Enter the host name, instance number, and a description for the system you want to add.b. Choose Nextc. Select the appropriate option:

• To authenticate using the current operating system user details, select the option Authenticationby the current operating system user.

• To authenticate using the engine user details, select the option Authentication by engine userand enter the user name and password.

d. Choose Finish.

Note:

• While working with information models, if you want to switch between systems, navigate to theQuickLaunch page and choose Manage Connections.

• To set a default system every time you restart the in-memory computing studio, chooseWindow >Preferences > Information Modeler > Quick Launch

3. Configure the information modelerMore information : Configuring the Information Modeler

2011-06-2337

Managing Modeling Content

Page 38: SAP HANA Modeling Guide

7.1.1 Configuring Data Services for Metadata Import

You use this procedure to import table definitions using Data Services Server.

Procedure1. Setting the Passphrase1. Log into the Central Management Console of SAP BusinessObjects Enterprise (BOE).2. Choose Manage > Applications3. Choose Data Services Application.4. Choose Settings.5. Enter the Encryption Passphrase.6. Choose Save.

Note:The passphrase you set here should be the same as the one you set in the SAP In_Memory Computingstudio.

Postrequisite: Restart the TOMCAT and BOE services.

2. Disabling Session Security1. Login to the Data Services Management Console.2. Choose Administrator.3. In the navigator pane, chooseWeb Services.4. Choose theWeb Services Configuration tab.5. Select the Import_Repo_Object checkbox.6. Select Disable Session Security from the dropdown menu.7. Choose Apply.

3. Creating a Data Source1. Go to Start > Control panel > Administrative Tools2. Choose Data Sources(ODBC)3. Choose the System DSN tab4. Choose Add5. Select HDBODBC from the driver list6. Choose Finish7. Enter the name and a description of the datasource.8. Enter the server details as host:3<instance number>15. For example, vml2562.wdf.sap.corp:34715.9. Enter the database in the format <SID><instance number>. For example, M4747.10. Connect using the credentials.

2011-06-2338

Managing Modeling Content

Page 39: SAP HANA Modeling Guide

7.1.2 Configuring the Information Modeler

You use this procedure to:• Activate all tables, user roles, and privileges that are required while working with the information

modeler .• Configure the server for performing a selective import .• Set the parameters that are used to define a model.• Generate time- related data that you need for data analysis .• Set data preview.• Applying validation rules on information objects.• Select the calculation view editor to work on calculation view.

Procedure1. Configure the Import Server (Optional)1. From the Quick Launch tab page, choose Manage Preferences.2. Expand the Information Modeler node3. Choose Configure Import Server.

a. Enter the server IP address from which you want to import data.b. Enter the repository name.c. Enter the ODBC data sourced. Choose OK.

Note:A data source is created on the data services system. You need to use this data source to load datainto the HANA target system.

2. Set the Default Model Parameters (Optional)1. From the Quick Launch tab page, choose Manage Preferences2. Expand the Information Modeler node3. Choose Default Model Parameters4. Select the client from the drop-down list. The client parameter is used to indicate the client to which

the model belongs.5. Select the language from the drop-down.

3. Set Calculated Attribute for Data Preview1. From the Quick Launch tab page, choose Manage Preferences.2. Expand the Information Modeler node3. Choose Calculated Attributes.

a. To make calculated attributes visible while previewing data, choose show calculated attributes.b. Choose Apply.c. Choose OK.

2011-06-2339

Managing Modeling Content

Page 40: SAP HANA Modeling Guide

4. Set Row Limit for Data Preview1. From the Quick Launch tab page, choose Manage Preferences.2. Expand the Information Modeler node3. Choose Data Preview Max Rows.

a. Select the maximum rows for data preview as required.b. Choose Apply.c. Choose OK.

Note:A data source is created on the data services system. You need to use this data source to load datainto the HANA target system.

5. Set Validation Rules1. From the Quick Launch tab page, choose Manage Preferences.2. Expand the Information Modeler node3. Choose Validation Rules.

a. Select the required rules to be applied while performing object validation.b. Choose Apply.c. Choose OK.

Note:Validation rules with severity as Error are mandatory .

6. Generate Time Data (Optional)1. From the Quick Launch tab page, choose Generate Time Data.2. Enter the period for which you want to generate data.3. Choose Generate.

Note:For all data that is associated with a time stamp, you need to convert this into a format that containsfields such as hours, days, months, years, and so on. Once you generate the time data, a table containingall the time data is created.

7. Set the Calculation View Editor1. From the Quick launch tab page, choose Manage Preferences.2. Expand the Information Modeler node3. Choose Calculation View

• To view old calculation views, choose Old Calculation View Editor• To create, modify and migrate calculation views, choose New Calculation View Editor .

4. Choose Apply.5. Choose OK.

7.2 Creating Schemas

2011-06-2340

Managing Modeling Content

Page 41: SAP HANA Modeling Guide

You create schemas to group the tables. For import you need to create the schema where all the tablesare imported.

Procedure1. From the Quick Launch tab page, choose SQL Editor.2. In the SQL editor, write the script create schema <schema name>.3. Execute the script using the green arrow button.

Result: The schema is created under the Default Catalog node.

7.3 Manage Schema Mapping

You use this procedure to map the logical schemas with the physical schemas while transferringinformation objects from a source system to target in case of SAP shipped content.

Example:

Consider a source system with information objects referring to physical schema S1 and a target systemwith physical schema S2. When you export content, the tables of S1 are copied to S2 but the copiedobjects at target can't be opened, as they still refer to S1 which is not present at target. To solve this,there is a mapping done by Administrator between the authoring (logical) schema and physical schemaboth at source and target, where the authoring schema remains same. So now, if there is an authoringschema A1 which points to S1 at source and to S2 at target then both at source and target A1 isreferred in spite of S1 and S2.

Procedure1. From the Quick Launch tab page, choose Schema Mapping.2. Choose Add.3. Enter the authoring schema name.4. Select the physical schema.5. Choose OK.

7.4 Migrating Calculation Views

You use this procedure to migrate old calculation views created using SQL script editor to the new onesbased on graphical(along with script) calculation view editor.

Procedure1. From the Quick Launch tab page, choose Migrate.2. Select the required calculation view(s).

2011-06-2341

Managing Modeling Content

Page 42: SAP HANA Modeling Guide

3. Choose Add.4. Choose OK.

Note:If the old calculation view has a function with refrences to internal functions, then those internal functionsare stored in the functions node of the same package to which this calculation view belongs.

The status of content copy can be viewed in Job log.

7.5 Importing and Exporting Models

You can import models from your local system or from a server.

Procedure

1. Creating Delivery UnitMore information: Creating Delivery Unit

2. Exporting Models(Server)More information: Exporting Models (Server)

3. Importing Models(Server)More information: Importing Models (Server)

4. Exporting Models(Client)More information: Exporting Models (Client)

5. Importing Models(Client)More information: Importing Models (Client)

7.5.1 Creating Delivery Unit

You use a delivery unit to create a group of transportable objects for content delivery and to exportinformation models from source system to target server.

Procedure1. From the Quick Launch tab page, choose Manage Delivery Units

a. To create a delivery unit, follow the steps given below:a. From the Delivery Units dialog box, choose Create.b. Enter the delivery unit name.

2011-06-2342

Managing Modeling Content

Page 43: SAP HANA Modeling Guide

c. Enter the responsible user.d. In the Version field, enter the delivery unit version.e. Enter the support package version of the delivery unit.f. Enter the patch version of the delivery unit.g. Choose OK.

b. To edit the information of an existing delivery unit, select the value.c. To view the list of folders pertaining to a delivery unit, select it.

Note:You need to associate packages with delivery units. This is required when you want to export models.

7.5.2 Exporting Models (Server)

You use this procedure to export models that use content delivered by SAP. A user with an administratorrole can also export models for user-defined content.

PrerequisiteYou have created a delivery unit. More information: Creating Delivery Unit

Procedure1. From the File menu, choose Export.2. Expand the Information Modeler node .3. Choose Information Models (Server).4. Select the source system from which you want to export the models.5. Choose the delivery unit from the drop-down list.6. Choose Finish.

The status of export can be viewed in Job log.

7.5.3 Importing Models (Server)

You use this procedure to import models that use content delivered by SAP. A user with an administratorrole can also import models for user-defined content.

PrerequisitesYou have exported models to a target server. More information: Exporting Models (Server)

Procedure1. From the File menu, choose Import .

2011-06-2343

Managing Modeling Content

Page 44: SAP HANA Modeling Guide

2. Expand the Information Modeler node.3. Choose Information Models (Server).4. Choose Next.5. Select the target system where you want to import the models.6. Choose Next.7. Select the file from the drop-down list.8. You can do any of the following :

• To overwrite inactive objects in the target system, select the optionOverwrite inactive versions.

• To activate objects in the target system, select the option Activate Objects.9. Choose Finish

The status of import can be viewed in Job log.

7.5.4 Exporting Models (Client)

You use this procedure to export models that use user-defined content

Procedure1. From the File menu, choose Export.2. Expand the Information Modeler node.3. Choose Information Models.4. Choose Next.5. Select the source system from which you want to export the models.6. Choose Next.7. Select the information models you want to export.8. Choose Add.9. Browse for the target location where you would want to export the models.10. Choose Finish.

The status of export can be viewed in Job log.

7.5.5 Importing Models (Client)

You use this procedure to import models that use user-defined content.

PrerequisitesYou have exported the information models. More information: Exporting Models (Client)

2011-06-2344

Managing Modeling Content

Page 45: SAP HANA Modeling Guide

Procedure1. From the File menu, choose Import.2. Expand the Information Modeler node.3. Choose the Information Models.4. Choose Next.5. Select the target system where you want to import the models.6. Choose Next.7. Browse for the target location where you want to import the models.8. From the list, select the information models you want to import.9. Choose Add.10. Choose Finish.11. From the context menu of the imported model, choose Activate.

The status of import can be viewed in Job log.

7.6 Copying Objects

You use this procedure to copy standard content shipped by SAP or an SAP partner to your localrepository.

PrerequisiteTo copy the contents of objects, the administrator needs to create a mapping in the_SYS_BI.M_CONTENT_MAPPING table.

Procedure1. From the Quick Launch tab page, choose Mass Copy.2. Select the required object(s).3. Choose Add.4. Choose Next.

Note:If you want to override a copied object, select the Copy checkbox.

5. Choose Finish.

The status of content copy can be viewed in Job log.

Note:

• To copy the content, you must have the following privileges:

• REPO.READ on the source package

• REPO.MAINTAIN_NATIVE_PACKAGES on the Root Package

• REPO.EDIT_NATIVE_OBJECTS on the Root Package

2011-06-2345

Managing Modeling Content

Page 46: SAP HANA Modeling Guide

• If you copy an object but not its parent/child objects, the copied object refers to the source'sparent/child objects.

2011-06-2346

Managing Modeling Content


Recommended