2

Bring your data from HANA Cloud to HANA On-prem via DP Agent

 2 years ago
source link: https://blogs.sap.com/2022/09/10/bring-your-data-from-hana-cloud-to-hana-on-prem-via-dp-agent/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
September 10, 2022 3 minute read

Bring your data from HANA Cloud to HANA On-prem via DP Agent

This feature is available and demonstrating how you can bring the data from BTP – SAP HANA Cloud Instance to SAP HANA Onpremise (SAP Commissions). It allows through DP Agent and managed instance to read data and execute commands against remote database source, for instance, HANA database server.

Using this feature, we can fetch data and update it in other databases without developing custom application.

ezgif-4-490840f2aa.png

Benefits

  • Allow to access data from outside of SQL Servers
  • It has the ability to perform distributed queries including select, update as well as other commands and transactions across heterogeneous data sources.
  • It has the ability to address different databases similarly.

Prerequisites

  • SAP BTP Cockpit – SAP HANA Cloud + WebIDE (database explorer)
  • DP Agent Configured
  • SAP Commissions – SAP HANA Onprem + WebIDE (database explorer)

High Level Flow

Data is moving from HANA Cloud to HANA Onprem via DP Agent and you can find the step by step explained below.

2022-09-10_23-41-28.gif

Let’s dive in SAP BTP – SAP HANA Cloud + WebIDE

Go to SAP BTP Cockpit – Select Service Marketplace – Select SAP HANA Cloud

2022-09-10_22-43-32.png

Click Manage SAP HANA Cloud to check database status and launch WebIDE

2022-08-27_14-56-59.png

Once you’re database is up and running,we are good to start 

2022-09-10_22-48-34.png

Go to Web IDE and follow the below steps to create a sample table

Create Table Demo_yoga (
ID INTEGER,
NAME VARCHAR(10),
PRIMARY KEY (ID)
);

Insert a sample data into a table created above

INSERT INTO Demo_yoga VALUES ('11','Yoga');

Let’s find out the table

select * from Demo_yoga

now, we can see table contains one row with dummy data in SAP HANA Cloud

2022-08-27_21-53-09.png

Let’s dive in SAP Commissions SAP HANA On Prem + WebIDE

Follow the link for DP Agent Installation SAP Commissions – Smart Data Integration[SDI] – Part 3 

you can go to your command prompt and your command path should be DP Agent.. run the CLI and select option 8 for Adapter Registration and select HanaAdapter

2022-08-27_18-16-52.png

Once Adapter is registered sucessfully, now you can register for the Agent

2022-08-27_17-56-28.png

Now you can login to your WebIDE and go to database explorer and expand the catalog to see Remote Source

Add Remote Source with all the information related to your Agent Registered and SAP HANA Cloud database credentials to link the server.

2022-08-27_19-24-29.png

now you can see Remote Sources, you can find your source Name ( In my example, its HANA Cloud)

2022-08-27_21-48-14.png

Go to your webIDE and try this below command to check if you’re getting result from SAP HANA Cloud database schema

CALL "PUBLIC"."GET_REMOTE_SOURCE_OBJECT_TREE"('HANA_Cloud','',?,?);
CALL GET_REMOTE_SOURCE_PROPERTIES ('HANA_Cloud', ?)
CALL PUBLIC.CHECK_REMOTE_SOURCE('HANA_Cloud');

now you can check Virtual table which will get the results from SAP HANA Cloud

select * from VT_yoga

As you can see from below screenshot, the results are pulled through Virtual table which is connected to SAP HANA Cloud table.

2022-09-10_23-51-10.png

Final thoughts

we can bring the data by linking SAP HANA Cloud database server to HANA Onprem database.

Steel chain links connected in the middle by a red paperclip, on white background, cut out

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK