Creating Attribute and Analytic view as persistent model in SAP HANA

Creating persistent models in SAP HANA allows you to store Attribute views and Analytic views as reusable objects in the repository. This is possible as all views can be created as persistent in SAP HANA. You need to get XMS representation by creating .attributeview, .analyticview, and .calculationview files and then activate them.

Understanding Persistent Views

Persistent views in SAP HANA are stored as design-time objects that can be version-controlled and deployed across different systems. These views are represented as XML files in the repository and must be activated to become runtime objects.

Creating Persistent Attribute Views

To create a persistent Attribute view, follow these steps ?

  • Create an .attributeview file with proper XML structure
  • Define the data foundation with tables and joins
  • Configure attributes and key attributes
  • Activate the view to make it available for consumption

Example Attribute View Structure

Here's the basic XML structure for an Attribute view ?

<?xml version="1.0" encoding="UTF-8"?>
<Cube:cube xmlns:Cube="http://www.sap.com/ndb/BiModelCube.ecore">
   <Cube:id>AT_CUSTOMER</Cube:id>
   <Cube:name>Customer Attribute View</Cube:name>
   <Cube:dataFoundation>
      <Cube:tableProxy>
         <Cube:table schemaName="SYSTEM" columnObjectName="CUSTOMER"/>
      </Cube:tableProxy>
   </Cube:dataFoundation>
</Cube:cube>

Creating Persistent Analytic Views

For Analytic views, you need to check the details of your view configuration and verify if there are specific paths or data sources that need to be modified. The .analyticview file combines Attribute views with fact tables to create analytical models.

Activation Process

After creating the view files, use the following activation command ?

CALL SYS.ACTIVATE_OBJECTS('<package_name>', '<view_name>.attributeview');

Conclusion

Creating persistent Attribute and Analytic views in SAP HANA enables reusable, version-controlled data models that can be efficiently deployed and maintained across different environments through proper XMS representation and activation processes.

Updated on: 2026-03-13T17:52:48+05:30

232 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements