You are on page 1of 13

8/14/12

Attribute view At a Glance | SAPERRORS.COM

SAPERRORS.COM
inf o@saper r or s.c om

Attribute view At a Glance


Posted on June 12, 2012 This document tells you about SAP HANA data modelling and using this document you can very much able to create your own attribute view in HANA system. The below diagram shows the major steps involved in creating Attribute View.

The pre-requisites to create Attribute View are..

i) Tables should exist with data

ii) Package should exist.

so i assume that readers know :

saperrors.com/2012/06/12/attribute-view-at-a-glance/#more-691

1/13

8/14/12

Attribute view At a Glance | SAPERRORS.COM

How to create a table in HANA How to insert values in the table How to create a Package

Steps involved in creating Attribute View using Single or Multiple tables :

Step1: Right click on your Package >New >Attribute View.

Step2: Give the technical name, description and type of attribute view.

saperrors.com/2012/06/12/attribute-view-at-a-glance/#more-691

2/13

8/14/12

Attribute view At a Glance | SAPERRORS.COM

We can create two types Attribute Views.

i) Standard

ii) Time

If we are creating Time type Attribute View then we have to mention which type of time data system has to use (Gregorian/Fiscal). We are not going to discuss this here.

saperrors.com/2012/06/12/attribute-view-at-a-glance/#more-691

3/13

8/14/12

Attribute view At a Glance | SAPERRORS.COM

saperrors.com/2012/06/12/attribute-view-at-a-glance/#more-691

4/13

8/14/12

Attribute view At a Glance | SAPERRORS.COM

We have below options also while creating Attribute Views i) Copy from: If you want to use already existing attribute view s template then go for this (you can modification if required for current one).

ii) Derived: This is kind of reference type. You cannot do modifications to the current one (Do the changes for main one). Click on next to proceed further. Step3: In the next screen, we have to select the tables on which we are going to build Attribute View.

For this example I am using CUST_INFO and SALES_EMPLY tables. Here we can select single or multiple tables (using control key), however I am going to select one table here and I will show how to add tables later.

Drill down appropriate schema, select the tables and click on add to move to right side.

saperrors.com/2012/06/12/attribute-view-at-a-glance/#more-691

5/13

8/14/12

Attribute view At a Glance | SAPERRORS.COM

Click on Finish to go to the Modeler Screen.

Step4:

Define Key Attributes: These are used as the keys when we join this Attribute with another Attribute or Analytic View. Right click any attribute > Add as Key Attribute.

Define Attribute: We have to explicitly define the attributes which are all we need in output. Right click on Attribute > Add as Attribute.

saperrors.com/2012/06/12/attribute-view-at-a-glance/#more-691

6/13

8/14/12

Attribute view At a Glance | SAPERRORS.COM

In this example I have taken Customer_Number as key attribute, Customer_name and Customer_Location as attributes.

We can see the output structure in Right side.

Step4: Now I want to populate the sales employee information for each customer in same Attribute View.

I have created table Sales_Emply but how to add this table to this view.

Using the Plus in the same screen (right top), we can add the table to this existing attribute view.

saperrors.com/2012/06/12/attribute-view-at-a-glance/#more-691

7/13

8/14/12

Attribute view At a Glance | SAPERRORS.COM

Now click on Add table and search for the table with name and click on Ok

Note: Disadvantage with this is we cannot add more than one table at a time. Step6: Define the joining condition between these two tables. Here I have joined Customer Number from both the tables.

saperrors.com/2012/06/12/attribute-view-at-a-glance/#more-691

8/13

8/14/12

Attribute view At a Glance | SAPERRORS.COM

The different types of Joins available in SAP HANA are:

i) Referential

ii) Inner

iii) Left Outer iv) Right Outer v) Text Join

Step7: Creating Hierarchies is optional while creating Attribute Views. In SAP HANA we can create two types of Hierarchies.

saperrors.com/2012/06/12/attribute-view-at-a-glance/#more-691

9/13

8/14/12

Attribute view At a Glance | SAPERRORS.COM

1) Level Based This is one to one mapping (one attribute one hierarchy)

2) Parent-Child This is one to many (one attribute can have multiple hierarchy levels) Step8: We have to save the attribute view and then activate it. Only activated views will be available for reporting clients and data preview as well.we can identify the difference between saved or saved and activated with rhombus symbol. Only saved views will have rhombus symbol.

After Save and Before Activation:

saperrors.com/2012/06/12/attribute-view-at-a-glance/#more-691

10/13

8/14/12

Attribute view At a Glance | SAPERRORS.COM

After Activation:

Once the view is activated system will create column view for each view and this will be stored in _SYS_BIC_ schema. The naming convention of the column view will be as follows.

<Package Name>/<View Name>

Step9: The one of the beauty of SAP HANA is Data Preview feature. Once the view creation was done, we can directly analyze the data in view in different perspectives.

The 3 options available in Data Preview are

i) Raw Data: we can see the data as it is present in the table (RAW).

saperrors.com/2012/06/12/attribute-view-at-a-glance/#more-691

11/13

8/14/12

Attribute view At a Glance | SAPERRORS.COM

ii) Distinct Values: In the Distinct value tab we can see each of the distinct values for all different objects that which we had select in the column tab. even the graphical view is available here with each values of the selected object.

iii) Analysis: the best ever feasibility ever provided by any BW tool for a developer. We can Use the HANA studio itself to see the analytics for our attribute view. We can give different Table object in labels axis, value axis tabs in Analysis, and can use filter as well frequently to analyze more granularly.

For example of Sales and region perspective, I have drag and drop SUB_REGION_NAME and ITEM_NAME to Labels axis and SALES_AMOUNT to Value axis. Then I have dragged REGION_NAME as Filter with America and APJ as my filter.

Below is the analytics for the above selection:

saperrors.com/2012/06/12/attribute-view-at-a-glance/#more-691

12/13

8/14/12

Attribute view At a Glance | SAPERRORS.COM

This entry was posted in Documentatation, HANA by SAPerrors. Bookmark the permalink.

saperrors.com/2012/06/12/attribute-view-at-a-glance/#more-691

13/13

You might also like