HANA - Smart Data Access (Adapter, Virtual Table)
Table of Contents
About
SAP HANA smart data access enables remote data to be accessed as if they are local tables in HANA, without copying the data into SAP HANA (without having to replicate the data to SAP HANA)
in SAP HANA, you can create virtual tables which point to remote tables in different data sources.
See HANA - Adapter (Virtual Table)
With smart data access SAP HANA, you can can retrieve data from tables in external databases (e.g. Sybase, Oracle or SAP HANA). This reduced the need to load all accessed data into SAP HANA.
Articles Related
Management
Privileges
- System privilege: CREATE REMOTE SOURCE
- Object privilege: CREATE VIRTUAL TABLE
- Object privilege DROP on VIRTUAL_TABLES (SYS)
Owner
It is recommended to create the remote source with the HANA SAP<SID> user. 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.
select * from ownership where object_name = '<Name of the remote source>'
Creation
CREATE REMOTE SOURCE <src_name> ADAPTER <adapter_name> [CONFIGURATION FILE '<file_name>']
CONFIGURATION <connection_info_string> [opt_credentials_clause]
Configuration
There will be .ini files created with prefix property_<DB_Name>.ini You will find it on HANA server under the dir instance $DIR_INSTANCE/../SYS/global/hdb/custom/config
DML
You can read as well as update the data using virtual tables in remote sources.
Virtual table can be manipulated by SAP HANA just like an ordinary table, which means the operations, such as select, update, insert, delete, and so on, are all available for virtual table.
Statistics
Statistics can be generated using statement
CREATE STATISTICS [<data_statistics_name>] ON <data_sources>
Four different types of statistics exist:
- HISTOGRAM,
- SIMPLE,
- SKETCH,
- RECORD COUNT