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.

Raw Storage

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.

Data Lake

Create Instance

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.

User Servey

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.

Instance Credentials

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.

Cloud Cockpit

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.

Database Explorer

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.

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
');
Advertisements