Attribute view –At a Glance _ SAPERRORS

Embed Size (px)

Citation preview

  • 7/31/2019 Attribute view At a Glance _ SAPERRORS

    1/13

    14/12 Attribute view At a Glance | SAPERRORS.COM

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

    [email protected]@saperrors.com

    Attribute view At a GlancePosted 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 :

  • 7/31/2019 Attribute view At a Glance _ SAPERRORS

    2/13

    14/12 Attribute view At a Glance | SAPERRORS.COM

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

    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.

  • 7/31/2019 Attribute view At a Glance _ SAPERRORS

    3/13

    14/12 Attribute view At a Glance | SAPERRORS.COM

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

    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.

  • 7/31/2019 Attribute view At a Glance _ SAPERRORS

    4/13

    14/12 Attribute view At a Glance | SAPERRORS.COM

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

  • 7/31/2019 Attribute view At a Glance _ SAPERRORS

    5/13

    14/12 Attribute view At a Glance | SAPERRORS.COM

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

    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.

  • 7/31/2019 Attribute view At a Glance _ SAPERRORS

    6/13

    14/12 Attribute view At a Glance | SAPERRORS.COM

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

    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.

  • 7/31/2019 Attribute view At a Glance _ SAPERRORS

    7/13

    14/12 Attribute view At a Glance | SAPERRORS.COM

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

    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.

  • 7/31/2019 Attribute view At a Glance _ SAPERRORS

    8/13

    14/12 Attribute view At a Glance | SAPERRORS.COM

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

    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.

  • 7/31/2019 Attribute view At a Glance _ SAPERRORS

    9/13

    14/12 Attribute view At a Glance | SAPERRORS.COM

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

    The different types of Joins available in SAP HANA are:

    i) Referential

    ii) Inner

    iii) Left Outer

    iv) Right Outerv) Text Join

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

    create two types of Hierarchies.

  • 7/31/2019 Attribute view At a Glance _ SAPERRORS

    10/13

    14/12 Attribute view At a Glance | SAPERRORS.COM

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

    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:

  • 7/31/2019 Attribute view At a Glance _ SAPERRORS

    11/13

    14/12 Attribute view At a Glance | SAPERRORS.COM

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

    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.

    /

    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).

  • 7/31/2019 Attribute view At a Glance _ SAPERRORS

    12/13

    14/12 Attribute view At a Glance | SAPERRORS.COM

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

    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 select ion:

  • 7/31/2019 Attribute view At a Glance _ SAPERRORS

    13/13

    14/12 Attribute view At a Glance | SAPERRORS.COM

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

    permalink.