How to create Attribute Views in SAP HANA Studio

1
3724

[adsenseyu2]

Hello everyone, in this SAP HANA Modeling tutorial we will learn how to create Attribute Views in SAP HANA Studio.

Prerequisites

  1. You should have installed SAP HANA Studio in your local machine.
  2. You should have connected to HANA system with your HANA DB Credentials.

Step-By-Step Procedure

1. Navigate to Window → Open Perspective → SAP HANA Modeler to change the perspective of your HANA Studio to SAP HANA Modeler (OR) Select the SAP HANA Modeler perspective in the perspective shortcut which is at the top right corner of your SAP HANA Studio.

SAP HANA Modeler Perspective
SAP HANA Modeler Perspective

OR

SAP HANA Modeler in HANA Studio
SAP HANA Modeler in HANA Studio

2. You will see four main folders  Catalog, Content, Provisioning and Security in your HANA System.Expand the Content folder and create and New Package.

New Package in SAP HANA Studio
New Package in SAP HANA Studio

3. In the New Package Window, enter Name and Description and click on OK.

New Package Window
New Package Window

4. Right click on the package we created in the previous step and choose New → Attribute View.

Attribute View
Attribute View

5. In the New Information View window, enter Name, Label and click on Finish.

New Information View
New Information View

6. A new HANA modeling view editor opens like below.

SAP HANA Modeling Editor
SAP HANA Modeling Editor

7. In the graphical editor of the HANA view editor, click on Add Objects. To see Add you need to hover on Data Foundation node.

Add Objects to Attribute View
Add Objects to Attribute View

8. In this tutorial we are going to create Attribute View against Employee table in EPM data model.Tables used in this example are SNWD_EMPLOYEE and SNWD_AD. In the Find popup window search for these table and add them to the Data Foundation.

Add Tables to the Data Foundation
Add Tables to the Data Foundation

9. Repeat the Step-8 to add SNWD_AD table as well.

10. Now you can see both or tables were added and can see that like below screen.

HANA Modeling Editor
HANA Modeling Editor

11. SNWD_EMPLOYEES table employee information and SNWD_AD stores the address of the employee. PR_ADDRESS_GUID is the field we can use to connect these two tables.Select this field and drag and drop to the NODE_KEY field in the SNWD_AD like below.

output

12. Now select the fields from these tables to show them in the output.
♦ Tip: To select the fields click on the circle which is left to the field until it turns to orange circle.

Output Fields in Attribute View
Output Fields in Attribute View

13. Now make the EMPLOYEE_ID as key attribute in this Attribute View. Select the field in the Output section and change the Key property as True.

[adsenseyu1]

14. Save and active the Attribute View by clicking on the Save and Active Save_Activate button on the top.

15. Now click on Data Preview button Data Preview to see the data in the Attribute View.

Save_Activate_Preview

  1. Save.
  2. Save and Active.
  3. Data Preview.

Output of Attribute View

Data in Attribute View
Data in Attribute View

You have successfully created Attribute View in SAP HANA Studio.

Please stay tuned to us for more SAP HANA tutorials.Please feel free to comment and let us know your feedback. You feedback will keep us alive.

Thank you. 🙂

like-128

  • Haritha Pinni

    nice post — very much helpful