- SAP HANA Cloud Tutorial
- SAP HANA Cloud - Home
- SAP HANA Cloud - Overview
- SAP HANA Cloud - Benefits
- SAP HANA Cloud - Architecture
- SAP HANA Cloud - Key Capabilities
- SAP HANA Cloud - Enabling Trial
- SAP HANA Cloud - Price Detail
- Integration with Other Apps
- SAP HANA Cloud - Connector(HCC)
- Connecting an Onpremise NW System
- SAP HANA Cloud - Data Lake
- Data Lake Components
- Connect to HANA Cockpit
- SAP BTP service
- Binding Applications
- SAP HANA Cloud - Migration
- Self-service Tool
- Creating Instance
- Creating Data Lake Instance
- Managing Instance
- Creating Tables
- Success Stories
- SAP HANA Cloud - Responsibilities
- SAP HANA Cloud Resources
- SAP HANA Cloud - Quick Guide
- SAP HANA Cloud - Resources
- SAP HANA Cloud - Discussion
SAP HANA Cloud - Data Lake
Data lake is one of fully integrated key component of SAP HANA Cloud platform, which stores all structured, unstructured data files and shares common security and tools as HANA Cloud. Data lake IQ component provides the high-performance SQL analysis on large volume of data stored in Data lake.
HANA Cloud data lake is usually managed and queried using SAP HANA Cloud SQL statements and data lake SQL statements. When you create a data lake instance, several things occur automatically.
When you create Data lake, it automatically provisions the below −
This creates a container in data lake called "SYSRDL#CG". It also creates a schema with the same name as the container is created. The container is managed and owned by schema and it resides all tables, views and indexes.
In HANA Cloud instance, a remote source named "SYSRDL#CG_SOURCE" also exists which is used to connect the instance to data lake. All query and data management in data lake is performed via SAP HANA Cloud platform.
To create a Data lake, you can either choose to create the data lake with instance creation or you can do after the instance is created. To enable data lake after your instance is provisioned, navigate to Manage HANA Cloud option in SAP HANA Cloud cockpit.
Click on 3 dots (...) on HANA Database instance and this will open side menu → Add Data Lake. Provide the Instance Name and description of your data lake. If you are using Trial account, you won’t be able to modify the Data Lake values for Storage, vCPU's → Save.
You can create tables, views, access the data reside on HANA Cloud data lake using Database Explorer option as mentioned. Navigate to Instance associated with specific data lake that you want to explore and click on "Action" button.
This will open a new tab to run SQL queries known as "Database Explorer" → Using this you can create new tables, access data in HANA Cloud data lake. To view the tables created in Data lake, right-click on "Remote Sources" option under the Catalog option of the Database instance.
You can also create Remote Source using SQL query as below by setting an ODBC connection to HANA database −
CREATE REMOTE SOURCE "hanateat" ADAPTER hanaodbc CONFIGURATION 'Driver=libodbcHDB.so;ServerNode=<endpoint>;dml_mode=readonly;encrypt=true;' WITH CREDENTIAL TYPE 'PASSWORD' USING 'user=<username>;password=<password>'
To run the query, click on Green button on top of SQL console.
How to Execute a data lake SQL statement in Data lake IQ (HANA DB-managed): You can connect to SAP HANA database, and use the REMOTE_EXECUTE procedure as below −
While using REMOTE_EXECUTE procedure, SQL query must be enclosed with single quotes. Below shows SQL query to create Table and View in Data Lake −
This statement creates table "Test_tbl".
CALL SYSRDL#CG.REMOTE_EXECUTE (' CREATE TABLE Test_tbl (X INT, Y INT) ');
This statement creates the data lake view VIEW_TEST.
CALL SYSRDL#CG.REMOTE_EXECUTE (' CREATE VIEW VIEW_TEST AS SELECT * FROM Test_tbl ');