• No results found

Setting Up the Analytic Model

In document hana_dev_en (Page 92-96)

NewFoo,Bar

6 Setting Up the Analytic Model

Modeling refers to an activity of refining or slicing data in database tables by creating views to depict a business scenario. The views can be used for reporting and decision-making.

The modeling process involves the simulation of entities, such as CUSTOMER, PRODUCT, and SALES, and relationships between them. These related entities can be used in analytics applications such as SAP BusinessObjects Explorer and Microsoft Office. In SAP HANA, these views are known as information views.

Information views use various combinations of content data (that is, non-metadata) to model a business use case.

Content data can be classified as follows:

● Attribute: Descriptive data, such as customer ID, city, and country.

● Measure: Quantifiable data, such as revenue, quantity sold and counters.

You can model entities in SAP HANA using the Modeler perspective, which includes graphical data modeling tools that allow you to create and edit data models (content models) and stored procedures. With these tools, you can also create analytic privileges that govern the access to the models, and decision tables to model related business rules in a tabular format for decision automation.

You can create the following types of information views:

● Attribute Views

● Analytic Views

● Calculation Views

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

You can perform the following tasks in the Modeler perspective:

● Import metadata

Create tables by importing the table definitions from the source systems using the Data Services infrastructure. For more information, see Importing Table Definitions.

Note: You can also create tables from scratch using the SAP HANA Development perspective. For more information, see Setting Up the Persistence Model.

● Load data

Load data into the table definitions imported from the source system using the Load Controller, Sybase Replication Server or SAP Landscape Transformation, and from flat files. For more information, see Loading Data into Tables.

Note: You can also provision data into the table definitions in the SAP HANA Development perspective.

For more information, seeSetting Up the Persistence Model.

● Create packages

Logically group objects together in a structured way. For more information, see Maintaining Repository Packages.

● Create information views

Model various slices of the data stored in the SAP HANA database. Information views are often used for analytical use cases, such as operational data mart scenarios or multidimensional reporting on revenue, profitability, and so on. For more information, see Creating Views.

● Create procedures

Create procedures using SQLScript for implementing a complex logic that cannot be achieved using other objects. For more information, see Developing Procedures.

● Create analytic privileges

Control which data that individual users sharing the same data foundation or view can see. For more information, see Setting Up Roles and Authorizations.

● Import SAP NetWeaver BW objects

Import SAP NetWeaver BW objects into SAP HANA, and expose them as information views. For more information, seeImporting BW Objects.

● Create decision tables

Create a tabular representation of related rules using conditions and actions. For more information, see Creating Decision Tables.

● Import and export objects

Import and export the content objects from and to the client and server location. For more information, seeImplementing Lifecycle Management.

Related Links

SAP HANA Studio [page 23]

The SAP HANA studio is an Eclipse-based development and administration tool for working with SAP HANA, including creating projects, creating development objects, and deploying them to SAP HANA. As a developer, you may want to also perform some administrative tasks, such as configuring and monitoring the system.

6.1 Setting Up the Modeling Environment 6.1.1 Setting Modeler Preferences

You can set preferences for your Eclipse workspace to set up the default settings that the system uses whenever you log on.

1. Choose Window Preferences Modeler

Note: You can also set the preferences choosing Quick Launch Manage Preferences 2. Identify the required preference and perform the corresponding substeps from the table below:

Requirement Preference Substeps

To specify the structure of content packages in the navigator panel

Content Presentation Hierarchical - to view the package structure in a hierarchical manner such that, the child folder is inside the parent folder. Flat - to view all the packages at the same level for example, sap, sap.ecc, sap.ecc.ui.

Show Object Type Folders - to group together similar objects in a package such as attribute views in the Attribute View package.

To set the preferences for loading data using flat file

Data From Local File 1. Browse the location to save error log files for data load using flat files.

2. Enter the batch size for loading data. For example, if you specify 2000 and a file has records of 10000 rows the data load will happen in 5 batches.

3. Enter a decision maker count that will be used to propose data types based on the file. For example, enter 200 if you want the proposal to be made based on the 200 rows of file data.

To set the default value for the client that will be used while previewing model data

Default Model Parameters Select the client from the Default Client drop-down list.

To enforce various rules on objects Validation Rules Select the required rules to be applied while performing object validation.

Requirement Preference Substeps

Note: Enforcing validation rules with severity “Error”

are mandatory.

To determine the numbers of rows to be displayed in a page

Data Preview Select the maximum rows for data

preview as required.

To specify a location for job log files Logs 1. Expand the Logs node.

2. Select Job Log.

3. Browse the location where you want to save the job log files.

To enable logging the repository calls and specify location for repository log files

Logs 1. Expand the Logs node.

2. Select Job Log.

3. Select true from the drop-down list.

4. Browse the location where you want to save the repository log files.

To enable search for the attributes used in the views

Search Options Select Enable Search Attributes. .

To allow lower case alphabets for attribute view, analytic view, calculation view, procedure and analytic privilege names

Case Restriction Deselect the Model name in upper case checkbox.

Note: After changing the preferences make sure you choose Apply and OK.

6.1.2 Configuring the Import Server

In order to load data from external sources to SAP HANA you need to establish a connection with the server. To connect you need to provide the details of BusinessObjects Data Services repository and ODBC drivers. Once the connection is established you can import the tables definition and then load the data into table definitions.

1. In the Quick Launch tab page, choose Configure Import Server.

2. Enter the IP address of the server from which you want to import data.

3. Enter the repository name.

4. Enter the ODBC data source, and choose OK.

6.1.3 Importing Table Definitions

One of the ways to create tables to load source system data into SAP HANA is to import the table definitions from the source system.

You have configured the SAP HANA modeler for importing metadata using the Data Services infrastructure.

Use this procedure to import table definitions (metadata) from a source system to load source system data into SAP HANA. You can point to these table definitions for creating various content models such as attribute, analytic, and calculation views.

Based on your requirements, use one of the following approaches:

● Mass Import: To import all table definitions from a source system. For example, you can use this approach if this is a first import from the given source system.

● Selective Import: To import only selected table definitions from a source system. For example, you can use this approach if there are only few table definitions added or modified in the source system after your last import.

1. If you want to import all table definitions, do the following:

a) In the File menu, choose Import.

b) Expand the SAP HANA Content node.

c) Choose Mass Import of Metadata, and choose Next.

d) Select the target system where you want to import all the table definitions, and choose Next.

e) In the Connection Details dialog, enter the operating system user name and password of the target system.

f) Select the required source system, and choose Finish.

Note: If the required system is not available from the dropdown list, you need to contact your administrator.

2. If you want to import selective table definitions, do the following:

a) In the File menu, choose Import.

b) Expand the SAP HANA Content node.

c) Choose Selective Import of Metadata, and choose Next.

d) Select the target system where you want to import the table definitions, and choose Next.

e) Select the required source system.

Note: If the required system is not available from the dropdown list, you need to add the new source system using Manage Connections.

f) In the Type of Objects to Import field, select the required type, and choose Next.

g) Add the required objects (tables or extractors) that you want to import.

Note: If you want to add dependent tables of a selected table, select the required table in the Target panel, and choose Add Dependent Tables in the context menu.

h) Select the schema into which you want to import the metadata.

i) If you selected object type as extractor, select the package into which you want to place the corresponding objects.

j) Choose Next, then review and confirm the import by choosing Finish.

If the source object is a table or non V-type extractor, the system creates physical tables and stores them in the selected schema. However, if the source object is a V-Type extractor, the system creates content models and stores these models in the selected package, and the underlying physical tables in the schema.

In document hana_dev_en (Page 92-96)