Unlock the Power of SAP HANA with Synonym Flexibility
Table of Contents:
- Introduction
- Benefits of Using Synonyms
- Remote Data Integration
- Accessing Remote Data in a Local Table
- Configuring Synonyms in the ACP Synonym File
- Configuring Virtual Tables in the HP Virtual Table Definition
- Visualizing Remote Data in a Calculation View
- Switching to Local Table Data
- Maintaining Data in the Local Table
- Flexibility and Revertability with Synonyms
Introduction
In this article, we will explore the usage of synonyms in SAP HANA to flexibly adjust and integrate data from remote tables into local tables without impacting the HANA model. We will discuss the benefits of using synonyms and how they can enhance data accessibility and manipulation.
Benefits of Using Synonyms
Synonyms provide a convenient way for business users to access additional data that may not be available on the local system. They allow for flexible integration of remote data into a given model, providing a seamless experience for users. By leveraging synonyms, users can easily connect to remote databases and access the required tables without the need for complex data extraction and transformation processes.
Remote Data Integration
In this scenario, we have a remote database called Gen Grantor with tables available in the schema called "Sales Order Header Data." The business user is interested in integrating this remote data into a given model.
Accessing Remote Data in a Local Table
To access the remote data, we use synonyms and virtual tables. The synonym application contains file definitions according to the design-time specifications. A synonym called "Sales Order HDI_Synonym" is created within the ACP synonym file, which is linked to the "Sales Order HDI" table version in the Gen Grantor schema.
Configuring Synonyms in the ACP Synonym File
The ACP synonym file contains the configuration details of the synonym. It specifies the name of the synonym and its linkage with the remote table. By modifying the synonym configuration, we can easily switch between remote and local tables without impacting the calculation view.
Configuring Virtual Tables in the HP Virtual Table Definition
The HP virtual table definition is used to configure virtual tables that point to remote databases. In our scenario, the virtual table "Sales Order HDR Table Virtual" is configured to point to the remote database in the Gen Grantor schema. The virtual table configuration includes the remote source name, database name, schema name, and user-provided services for connectivity.
Visualizing Remote Data in a Calculation View
The virtual table created is referenced within a calculation view through the synonym. The calculation view uses the synonym configuration to connect to the remote table and visualize the data. By running SQL statements on the calculation view, we can verify the data visualization.
Switching to Local Table Data
In addition to the remote table, a local table called "Sales Order Header Table Local" is specified. The local table has the same attributes and measures as the remote table. By modifying the synonym configuration, we can switch the synonym to point to the local table, allowing the calculation view to access the local data without any impact.
Maintaining Data in the Local Table
To enable data management of the local table, the IT department needs to create and maintain the table. In our scenario, the data is copied from the remote table to the local table. By rerunning SQL statements on the local table and the calculation view, we can verify the availability of the data.
Flexibility and Revertibility with Synonyms
The usage of synonyms provides flexibility for business users to switch between remote and local data access. This flexibility allows for performance optimization and network issue resolution by accessing the data locally. The IT department can easily revert the data access back to the remote table if needed. By modifying and saving the synonym configuration, the system will recognize the changes and rebuild the synonym accordingly.
Conclusion
The usage of synonyms in SAP HANA provides a flexible and efficient way to integrate remote data into local tables without impacting the HANA model. By leveraging synonyms and virtual tables, business users can easily access and manipulate data from remote databases. The flexibility and revertibility offered by synonyms enhance data accessibility and enable optimal performance.