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.

  • Attribute Views are used in Analytical and Calculation Views for analysis to pass the master data.

  • They are similar to characteristics in BM and contain the master data.

  • Attribute Views are used for performance optimization in large size Dimension tables. You can limit the number of attributes in an Attribute View, which are further used for reporting and analysis purpose.

  • Attribute Views are used to model the master data to give some context.

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 −

  • Standard
  • Time
  • Derived

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 −

  • Scenario pane that has Data Foundation and Semantic Layer.

  • Details pane that shows the attribute of all tables added to Data Foundation and joining between them.

  • Output pane where you can add attributes from the Detail pane to filter in the report.

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
Kickstart Your Career

Get certified by completing the course

Get Started