SAP BW on HANA & HANA Smart Data Access
SAP BW on HANA & HANA Smart Data Access
TABLE OF CONTENTS
DOCUMENT VERSION ............................................................................................................................... 3
DESCRIPTION ............................................................................................................................................ 3
WHAT ARE TECHNICAL SETTINGS FOR THE USAGE OF HANA SMART DATA ACCESS WITH THE
BUSINESS WAREHOUSE? ........................................................................................................................ 4
Configuration ............................................................................................................................................. 4
HOW TO CREATE AN OPEN ODS VIEW WITHIN THE SAP BUSINESS WAREHOUSE ON HANA? ........ 5
Source Table .............................................................................................................................................. 6
Open ODS View.......................................................................................................................................... 7
Detailed Settings........................................................................................................................................ 8
Virtual Table ............................................................................................................................................... 9
BW Query Execution.................................................................................................................................10
2
SAP BW ON HANA & HANA SMART DATA ACCESS – OPEN ODS VIEW
Document history
3
SAP BW ON HANA & HANA SMART DATA ACCESS – OPEN ODS VIEW
This article describes how SAP BW 7.40 SP5 on SAP HANA SP7 accesses remote sources via the creation
of an Open ODS View of type “Virtual Table”. When creating an Open ODS View in BW, a Virtual Table is
generated automatically in HANA.
Virtual Tables can also be created manually for remote objects - see http://help.sap.com/hana_platform
SAP HANA Administration Guide (About SAP HANA Smart Data Access Creating Virtual Tables). This
topic is not covered in this article.
WHAT ARE TECHNICAL SETTINGS FOR THE USAGE OF HANA SMART DATA ACCESS WITH THE
BUSINESS WAREHOUSE?
Configuration
System Parameters for Smart Data Access in the indexserver.ini (section smart_data_access) are described
in the HANA Admin Guide, section "6.1.1.15 SAP HANA Smart Data Access System Parameters".
For Revision 70 et sqq. it is recommended to modify the following parameters in the HANA Studio for best
performance in our BW Scenarios. Parameter defaults are subject to review and change for future revisions.
Currently there are two basic federation optimization methods available (semi-join and join relocation), which
reduces the data transfer between the remote source database and the local HANA database.
Semi-join:
On the table in the local HANA matching values (from the join condition) are selected and filters applied.
These values are shipped to the remote source. The result of this selection (reduction) is sent back to the
local HANA and the join is executed inside HANA.
Join relocation:
Joins between a local and a remote table can be relocated to the remote source. In the remote source a
temporary table is created and bulk inserts take place. In the remote source the join is executed and returns
the result set back to the local system.
4
SAP BW ON HANA & HANA SMART DATA ACCESS – OPEN ODS VIEW
We will discuss more details of the performance aspects and the effect of these parameters in a later article.
As of HANA Revision 74.01, a new default cardinality for virtual tables has been introduced. If database
statistics are not available for the virtual table, then HANA assumes a cardinality of 1 million records for the
virtual table (formerly 10.000 records). This should better “protect” the source database against expensive
queries caused by suboptimal query optimization. The default cardinality is set by parameter
virtual_table_default_cardinality in the indexserver.ini (section smart_data_access).
HOW TO CREATE AN OPEN ODS VIEW WITHIN THE SAP BUSINESS WAREHOUSE ON HANA?
As of SAP BW Release 7.40 SP5 you can easily create an Open ODS View with type “Virtual Table”. Details
on how an Open ODS View can be created can be found in the online documentation or the help in the BW
Modeling perspective in the HANA Studio under Help Help Contents Creating an Open ODS View
There is also a comprehensive guide available about the Open ODS View see
https://scn.sap.com/docs/DOC-50504.
A typical scenario is described in the following section where a remote table containing facts is combined
with the master data which resides inside the SAP Business Warehouse on HANA system.
5
SAP BW ON HANA & HANA SMART DATA ACCESS – OPEN ODS VIEW
Source Table
The remote table of this example resides in a remote HANA System. In this example it is a table containing
facts.
6
SAP BW ON HANA & HANA SMART DATA ACCESS – OPEN ODS VIEW
The following options have to be selected when creating an Open ODS View with Virtual Table in the BW
Modeler perspective in the SAP HANA Studio.
Picture 3: Creation of an Open ODS View with the BW Modeler – Choosing the remote source
You define a name and description and you select “Virtual Table” as source type. As remote source you
enter the name of the remote source which you have created see the article about the SDA setup.
Furthermore you have to select the database schema in which the table resides and finally you select the
remote table/view itself.
7
SAP BW ON HANA & HANA SMART DATA ACCESS – OPEN ODS VIEW
The Source System name enables you to transport an Open ODS View from Development to Quality to
Production system and always connect to a different remote database by providing a Source-System
mapping as for Standard BW DataSources.
Detailed Settings
In the next step you can link fields to InfoObjects as we e.g. want to use navigational attributes or texts
stored in the local BW. You can also find more details on specific settings in https://scn.sap.com/docs/DOC-
50504.
An important setting represents the checkbox “I confirm the Referential Integrity”. In case you set the
checkbox you confirm that you are sure that the required master data for all the characteristic values is
available in the system. For the execution of the join it means that an inner join is executed between BW
master data tables and the Virtual Table. In case you do not use referential integrity and there is new master
data in the source which is not available in the SAP Business Warehouse, new master data is written to the
master data tables, the same way as this is handled for e.g. Virtual Providers on top of HANA models. This
feature is further described and illustrated in the following “First Guidance” document in section “Influence of
Referential Integrity setting when mapping EDW core InfoObjects”: https://scn.sap.com/docs/DOC-50504.
When external data fields are linked with BW data, the field types must “match”. There are e.g. no integer
characteristics available in BW. Therefore some native transformations have been introduced. What “match”
means will be discussed in another article on this SCN page.
8
SAP BW ON HANA & HANA SMART DATA ACCESS – OPEN ODS VIEW
Note that the SAP HANA system authorization CREATE REMOTE SOURCE is required to create a remote
source. If the remote source is not created with the SAP<SID> user but with a different database user
instead, then this database user must assign the corresponding object authorizations to the SAP<SID> user
(CREATE VIRTUAL TABLE and DROP). For more information see SAP note 1989436 - Open ODS View
with Smart Data Access - Invalid Table Name during Query Execution and SAP HANA Security Guide
(http://help.sap.com/hana_platform).
When creating a remote source in SAP HANA, you specified a user for the connection to the source
database. SAP HANA passes the SQL statements on to this user. Make sure that this user has sufficient
authorizations in the relevant schemas and tables in the source database. More information: SAP HANA
Security Guide (http://help.sap.com/hana_platform).
Virtual Table
The generated virtual table follows the naming convention /BIC/E<Name of the Open ODS View> in the
SAP<SID> schema. It’s a HANA table of type “Virtual”.
Picture 5: Virtual Table which has been generated from Open ODS View XSB_01S_BZH
9
SAP BW ON HANA & HANA SMART DATA ACCESS – OPEN ODS VIEW
BW Query Execution
Now you can build queries on top of this Open ODS View or use the Open ODS View in a
CompositeProvider to combine it with additional BW data in DSOs, InfoCubes or another Open ODS View
(see the help in the BW Modeling perspective in the SAP HANA Studio under Help Help Contents
Creating CompositeProviders or this guide).
Several query optimizations are currently introduced to improve performance when using SAP HANA Smart
Data Access. Semi-join and join relocation optimizations are performed where applicable.
How the runtime of a BEx query on an Open ODS View looks like (statistics, traces, SQL statement,
optimizations etc.) will be content of another article on this SCN page.
10
www.sap.com
Crossgate, m@gic EDDY, B2B 360°, and B2B 360° Services are
registered trademarks of Crossgate AG in Germany and other
countries. Crossgate is an SAP company.
All other product and service names mentioned are the trademarks of
their respective companies. Data contained in this document serves
informational purposes only. National product specifications may vary.