Mysql--Talend to sync data from MySQL to SAP HANA Database

This document would introduce the basic function of Talend. We would use this ETL tool to sync data from MySQL to SAP HANA Database.

 下载地址参照:(我看了应该是有免费版)https://www.talend.com/download/

Open Talend and create a project

1. Unzip Talend Open Studio you downloaded from Talend official site to your local folder;

2. Click “TOS_DI-win32-x86.exe” to start the studio;

Mysql--Talend to sync data from MySQL to SAP HANA Database

3. On the first run, you could choose to import the Demo Project or create a new one. This time we could create a new project for the tutorial. Input the project name “SAPBlue_Project” and click “Create” button.

Mysql--Talend to sync data from MySQL to SAP HANA Database

4. A wizard window will pop up. Input the description and click “Finish” button.

Mysql--Talend to sync data from MySQL to SAP HANA Database

5. Select the project you just created and click “Open” button.

Mysql--Talend to sync data from MySQL to SAP HANA Database

6. The registration window pops up. You can just click “Skip”.

Mysql--Talend to sync data from MySQL to SAP HANA Database

7. The studio is opened.

Mysql--Talend to sync data from MySQL to SAP HANA Database

 

Create a Job

1. Let’s create a new “Job” by click the hyperlink.

Mysql--Talend to sync data from MySQL to SAP HANA Database

2. Input the Name/Purpose/Description and click “Finish”.

Mysql--Talend to sync data from MySQL to SAP HANA Database

3. The Studio is fully opened for the new Job.

Mysql--Talend to sync data from MySQL to SAP HANA Database

 

Create DB Connections

1. Expand the “Metadata” in “Repository” window.

Mysql--Talend to sync data from MySQL to SAP HANA Database

2. Right-click and choose “Create connection”.

Mysql--Talend to sync data from MySQL to SAP HANA Database

 

MySQL

1. Input the general information.

Mysql--Talend to sync data from MySQL to SAP HANA Database

2. Choose “MySQL” in the “DB Type” dropdown list and input the server information.

Mysql--Talend to sync data from MySQL to SAP HANA Database

3. Click “Check” button to make sure your configuration is right and then click “Finish”.

Mysql--Talend to sync data from MySQL to SAP HANA Database

4. Right click the connection and select “Retrieve Schema”.

Mysql--Talend to sync data from MySQL to SAP HANA Database

5. Click “Next” and then select two tables as following.

Mysql--Talend to sync data from MySQL to SAP HANA Database

6. Click “Finish”.

 Mysql--Talend to sync data from MySQL to SAP HANA Database

SAP HANA Database

1. If you have a look at the “DB Type”, you would find the “SAPHana” option.

Mysql--Talend to sync data from MySQL to SAP HANA Database

2. But unfortunately, since currently we have not related component for output operation, we choose traditional “General JDBC” connection type.

Mysql--Talend to sync data from MySQL to SAP HANA Database

* You could use the parameter “currentschema” to set the schema info.
* You need the driver “ngdbc.jar” for SAP HANA Database.
* Input “saphana_id” in the “Mapping file” textbox.

3. Now we have our connection ready.

Mysql--Talend to sync data from MySQL to SAP HANA Database

 

Input Definition

1. We try to read data from MySQL. So we find the component in “Databases/MySQL”

Mysql--Talend to sync data from MySQL to SAP HANA Database

2. Drag and Drop the component to the design area.

Mysql--Talend to sync data from MySQL to SAP HANA Database

3. Click the “tMysqlImput_1” and see the “Component” panel below.

Mysql--Talend to sync data from MySQL to SAP HANA Database

4. Select “Repository” for “Property Type”.

Mysql--Talend to sync data from MySQL to SAP HANA Database

5. Choose the connection we just created for MySQL.

Mysql--Talend to sync data from MySQL to SAP HANA Database

6. Input “orders” in “Table Name” field.

Mysql--Talend to sync data from MySQL to SAP HANA Database

7. Create another “tMysqlInput” component for table “customers”.

Mysql--Talend to sync data from MySQL to SAP HANA Database

 

Map Data

1. We use a “tMap” component to do “Join” operation. Input “tMap” in the search textbox and hit Enter.

Mysql--Talend to sync data from MySQL to SAP HANA Database

2. Drag and drop it to the design area.

Mysql--Talend to sync data from MySQL to SAP HANA Database

3. Right click one of the inputs and choose “Row/Main”.

Mysql--Talend to sync data from MySQL to SAP HANA Database

4. Click “tMap_1”.

Mysql--Talend to sync data from MySQL to SAP HANA Database

5. Do it again for another.

Mysql--Talend to sync data from MySQL to SAP HANA Database

6. Double click the “tMap_1”.

Mysql--Talend to sync data from MySQL to SAP HANA Database

7. Build the “Join” relation by drag and drop.

Mysql--Talend to sync data from MySQL to SAP HANA Database

8. Click “Add” icon on the right side and add the following info.

Mysql--Talend to sync data from MySQL to SAP HANA Database

9. Map the field by drag and drop and click “OK” button.

Mysql--Talend to sync data from MySQL to SAP HANA Database

 

Output Data to HANA DB

1. Add a “tJDBCOutput” component on the design area and fill in the info as following.

Mysql--Talend to sync data from MySQL to SAP HANA Database

2. Link the “tMap_1” with “tJDBCOuput_1” by right-click and choose “Row/out1”.

Mysql--Talend to sync data from MySQL to SAP HANA Database

 

Run the Job

1. Click “run” button in the menu and the job is running.

Mysql--Talend to sync data from MySQL to SAP HANA Database

2. Then the job finished.

Mysql--Talend to sync data from MySQL to SAP HANA Database

3. We check the HDB and here they are.

Mysql--Talend to sync data from MySQL to SAP HANA Database

 

<<over>>