SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
โคข Open full site

Virtualize Data from a Managed SAP HANA Cloud, Data Lake to an SAP HANA Cloud, SAP HANA Database

Virtualize data in SAP HANA Cloud, SAP HANA database from different SAP HANA Cloud, data lake instances.

Overview

🎓 beginner 10 min. SAP HANA CloudBeginnerSAP HANA CloudSAP HANA DatabaseSAP HANAData Lake

You will learn

  • โœ”How to create a remote source in SAP HANA Cloud, SAP HANA database to a managed data lake
  • โœ”How to virtualise data from a managed data lake to SAP HANA Cloud, SAP HANA database
Christopher Kollhed C Christopher Kollhed November 1, 2022
Created by August 15, 2021
Contributors

Prerequisites

Prerequisites

  • Two running SAP HANA Cloud, SAP HANA database instances in a production environment, one having a managed data lake.
  • Completion of the previous tutorial in this group is recommended.
  • Since this tutorial requires two SAP HANA Cloud, SAP HANA database instances, you need to have a productive environment of SAP HANA Cloud, SAP HANA database as trial only allows to have one instance.

Steps

Intro

In this tutorial, you will learn how you can connect an SAP HANA Cloud, SAP HANA database instance to multiple different data lakes. When you provision an SAP HANA Cloud, SAP HANA database instance, you can provision a managed data lake as well.

If you have multiple SAP HANA database and data lakes instances, you can easily virtualise data from one data lake to another or to another SAP HANA database instance. Let’s say for example, you have two SAP HANA database instances each with a managed data lake in SAP HANA Cloud. If you now want to virtualise data from one data lake to an SAP HANA database instance that is not its managed data lake, you can connect to it via its associated SAP HANA database instance. Through that SAP HANA database instance, the data lake will then be connected.

HDL-HDL
HDL-HDL

Besides the options described in this tutorial, you can also connect directly to a standalone SAP HANA Cloud, data lake. To learn more, we recommend this mission.

The following steps will show you how to connect an SAP HANA Cloud, SAP HANA database instance to an SAP HANA cloud, data lake that is managed via a second SAP HANA Cloud, SAP HANA database.


Step 1 Obtain the certificate string
โ€”

As with other remote sources, connecting to an SAP HANA Cloud, data lake requires a certificate to be stored in your PSE. In this step, you will obtain the certificate you need.

  1. First, in SAP BTP Cockpit or SAP HANA Cloud Central, navigate to the SAP HANA database instance that is corresponding to the SAP HANA Cloud, data lake you want to connect to. Copy the SQL endpoint of the SAP HANA database instance corresponding to this data lake and paste the endpoint information in a text editor.

  2. In this SAP HANA database instance, make sure to have a user who has permissions to access the database and data lake instances. You can read here how to create users in SAP HANA Cloud, SAP HANA database. You will need the credentials of this user later in this tutorial.

  3. Next, you need to create a certificate and put it in a certificate store so it can be used for creating a remote source.

  4. First, to get the certificate string, download the pem file to your local device by accessing your command line (iTerm or Terminal on iOS, or Command Prompt on WIN) and entering this command:

    Shell/Bash

curl -O https://cacerts.digicert.com/DigiCertGlobalRootCA.crt.pem

Code

5.	After the file has been downloaded, you can access it with a text editor such as `Microsoft Notepad` or `Apple TextEdit`. Copy the certificate string to your clipboard.



### Add the certificate to your PSE



1.	Now, in the **SAP HANA Database Explorer** that is connected to your SAP HANA database instance, open a **SQL console**.
2.	Create a certificate store, also called **PSE** (personal security environment), if you have not done so already.
    ```SQL
CREATE PSE <certificate store name>;
  1. Create a certificate for the SAP HANA Cloud, data lake you want to connect and name it (HDL in this example) using SQL statement below. You need to paste the certificate string you retrieved in Step 1 as a single line without any line-breaks (already included in this statement):

    SQL

– create certificate CREATE CERTIFICATE FROM ‘—–BEGIN CERTIFICATE—– MIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBhMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0wNjExMTAwMDAwMDBaFw0zMTExMTAwMDAwMDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4jvhEXLeqKTTo1eqUKKPC3eQyaKl7hLOllsBCSDMAZOnTjC3U/dDxGkAV53ijSLdhwZAAIEJzs4bg7/fzTtxRuLWZscFs3YnFo97nh6Vfe63SKMI2tavegw5BmV/Sl0fvBf4q77uKNd0f3p4mVmFaG5cIzJLv07A6Fpt43C/dxC//AH2hdmoRBBYMql1GNXRor5H4idq9Joz+EkIYIvUX7Q6hL+hqkpMfT7PT19sdl6gSzeRntwi5m3OFBqOasv+zbMUZBfHWymeMr/y7vrTC0LUq7dBMtoM1O/4gdW7jVg/tRvoSSiicNoxBN33shbyTApOB6jtSj1etX+jkMOvJwIDAQABo2MwYTAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA95QNVbRTLtm8KPiGxvDl7I90VUwHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VUwDQYJKoZIhvcNAQEFBQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/EsrhMAtudXH/vTBH1jLuG2cenTnmCmrEbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIttep3Sp+dWOIrWcBAI+0tKIJFPnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886UAb3LujEV0lsYSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQkCAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4=—–END CERTIFICATE—–’ COMMENT ‘HDL’;

Code

4.	Next, get the certificate ID of this certificate by running this SQL statement:
```SQL
SELECT CERTIFICATE_ID FROM CERTIFICATES WHERE COMMENT = 'HDL';
  1. Add this certificate to the certificate store by inserting the certificate ID into the SQL statement:
    SQL

ALTER PSE SSL ADD CERTIFICATE <certificate_id>;

Code

6.	Now set the PSE purpose as a remote source (unless you already have when following the instructions in the previous tutorial). This way, all remote sources you create will use the certificates stored in the PSE. Please note, that only one PSE can be set as a remote source purpose.

    ```SQL
SET PSE SSL PURPOSE REMOTE SOURCE;
Step 2 Create a remote source
+
Step 3 Create a virtual table
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 3
1. Obtain the certificate string 2. Create a remote source 3. Create a virtual table

Learn more →