Using Attribute View

In SAP HANA, Attribute Views are used to model characteristics. They are used to join Dimension tables or other Attribute Views. You can also copy a new Attribute View from the already existing Attribute Views inside other Packages, but that doesn't let you change the View Attributes.

Following are the key characteristics of HANA Attribute view.

How to Create an Attribute View?

In SAP HANA, all modeling objects are created inside the package and stored in HANA Repository. Choose the Package name under which you want to create an Attribute View. Right-click Package_Name → Go to New → Attribute View...

Attribute View

When you click Attribute View, a new window will open. Enter Attribute View name and description in this window and from the dropdown list, choose View Type and Sub-type.

Following are the categories of Attribute View sub-type −

If you want to copy an existing Attribute view, you can use the "Copy From" option. When you click the "Copy From" option, it shows all other Attribute views that you can use to create a copy.

Copy From

Time sub-type Attribute View is a special type of Attribute view that adds a Time Dimension to Data Foundation. When you enter the Attribute name, type, and sub-type and click Finish, it will open three work panes −

You can add Objects to Data Foundation, by clicking the '+' sign written next to Data Foundation. You can add multiple Dimension Tables and Attribute Views in the Scenario Pane and join them using a Primary Key.

When you click Add Objects "+" sign in Data Foundation, you will get a search bar from where you can add Dimension tables and Attribute views to the Scenario Pane. Once Tables or Attribute Views are added to Data Foundation, you can see all the columns on the right side pane. They can be joined using a Primary Key in the Details Pane as shown in the following screenshot.

Primary Key

Once the joining is complete, choose multiple attributes in the details pane, right-click and Add to Output. All columns will be added to the Output pane. Now click the Activate option and you will get a confirmation message in the job log.

Now you can right-click the Attribute View and go for Data Preview. Once you click Data Preview, it will show all the attributes that has been added to the Output pane under Available Objects.

Data Preview

SAP HANA also provides reporting feature for data analysis. These Objects can be added to Labels and Value axis by a right-click or by dragging the objects as shown in the following screenshot.

Reporting Data Analysis