Attribute view has the following advantage-

Attribute View act as Master data context, which provides Text or Description for Key/Non-key field. Attribute View can be reuse in Analytic View and Calculation View. Attributes View is used to select a subset of columns and rows from a database table. Attributes (fields) can be calculated from multiple table fields. There is no measure and aggregation option.

Attribute View Type

Attribute View are 3 types-

M_TIME_DIMENSION M_TIME_DIMENSION_ YEAR M_TIME_DIMENSION_ MONTH M_TIME_DIMENSION_WEEK For calendar type Fiscal – M_FISCAL_CALENDAR

M_FISCAL_CALENDAR

How to Create Attribute View in SAP HANA

Standard view creation has pre-define step as below-

Table Creation for Attribute View Here we are going to create Standard Attribute View for product table, so firstly we create “PRODUCT” and “PRODUCT_DESC” Table. SQL Script is shown as below for table creation – Product table Script – Product Description table Script- Now table “PRODUCT” and “PRODUCT_DESC” is created in schema “DHK_SCHEMA”. Attribute View Creation STEP 1) Select SAP HANA System.

Select content Folder. Select Non-Structural Package Modelling under Package DHK_SCHEMA in the content node and right click->new. Select Attribute view option.

STEP 2) Enter information.

Enter Attribute Name and Label. Select View Type, here Attribute View. Select subtype as “Standard”. Click on Finish Button.

Scenario Pane: In this pane the following node exists-

Semantics Data foundation

Detail Pane: In this pane following tab exists –

Column View Properties Hierchery

Semantics (Scenario Pane): This node represents output structure of the view. Here it is Dimension. Data Foundation (Scenario Pane): This node represents the table that we use for defining attribute view. Here we drop table for creating attribute view. Tab (columns, view Properties, Hierarchies) for details pane will be displayed. Local: Here all Local attribute detail will be displayed. Show: Filter for Local Attribute. Detail of attribute. This is a toolbar for Performance analysis, Find column, validate, activate, data preview, etc.

STEP 4) Click on data foundation node. To include database table for creating attribute view, click on data foundation node and follow the instruction step by step as below –

Drag table “PRODUCT” and “PRODUCT_DESC” from TABLE node under DHK_SCHEMA Drop “PRODUCT” and “PRODUCT_DESC” to data foundation node. Select field from “PRODUCT” Table as Output In detail pane. Field icon color changes from grey to orange. Select field from “PRODUCT_DESC” Table as Output in the detail pane. Field Icon color change from grey to orange. The field selected as output from both the table appear Under Column list in Output Pane.

Join “PRODUCT” table to “PRODUCT_DESC” by “PRODUCT_ID” field. STEP 5) Select the path. Select Join path and Right Click on It and choose Edit option. A screen for Edit Join Condition will appear

Select Join Type as Type “Inner”. Select cardinality as “1..1”.

After selecting join type click on “OK” button. In next step, we select the column and define a key for output. STEP 6) Select column. In this step, we will select column and define the key for output

Select Semantic Panel. Column tab will appear under Detail pane. Select “PRODUCT_ID” as Key. Check Hidden option for field PRODUCT_ID_1 (PRODUCT_DESC table field). Click on validate Button. After successful validation, click on activate Button.

Job Log for validation and activation activity is displayed on bottom of screen on the same page, i.e. Job Log section as below –

Go to DHK_SCHEMA->MODELLING Package. AT_PRODUCT Attribute view display under Attribute view folder.

STEP 8) Check data. To view data in Attribute view, Select data Preview option from the toolbar. There will be two option for data view from attribute view.

Open in Data Preview Editor (This will display data with analysis option). Open in SQL Editor. (This will display output as only SQL query Output).

STEP 9) Check view data in editor. To see View Attribute data in data Preview editor, There are 3 options – Analysis, Distinct and Raw data. Analysis: This is a Graphical representation of the attribute view.

By selecting Analysis tab, we select Attributes for Label and Axis format view. Drag and drop attribute in label axis, it will display in Label axis(X Axis). Drag and drop attribute in value axis, it will display in value axis (Y Axis). The output will be available in the format of Chart, Table, Grid, and HTML.

Distinct Values: The distinct value of the column can be displayed here. This will show total no. records for selected attribute.

Raw Data tab: This option display data of attribute view in table format.

Click on Raw data tab It will display the data in table format

STEP 10) Check data from SQL editor. View Attribute data in from SQL editor as below –

This option display data through SQL Query from the column view under “SYS_BIC” schema. A column view with name “will created after activation of attribute view “AT_PRODUCT”. This is used to see SQL query used for displaying data from the view.

Display SQL Query for data selection. Display output.

Attribute View when activated, a column view under _SYS_BIC schema is created. So, when we run Data Preview, system select data from column view under a _SYS_BIC schema. Screen shot of column view “AT_PRODUCT” under “_SYS_BIC” Schema of catalog node is as below –