Home > Database > Mysql Tutorial > Graphical code analysis of migrating mysql data to Oracle

Graphical code analysis of migrating mysql data to Oracle

黄舟
Release: 2017-03-28 13:48:50
Original
1365 people have browsed it

This article mainly introduces the correct method of data migration to Oracle in detail mysql, which has certain reference value. Interested friends can refer to it

mysql databaseThere is a table student in the Oracle database, its structure is as follows:

Graphical code analysis of migrating mysql data to Oracle

There is a table from_mysql in the Oracle database, its structure is as follows:

Graphical code analysis of migrating mysql data to Oracle

Now we need to transfer the data from mysql student to Oracle's from_mysql. Here, I can quickly implement this function with the help of kettle's spoon tool.

First, open spoon, create a new transformation, named table input to table output. Then find the table input from the input in the core object , drag it to the editing interface, then find the output from the output and drag it to the editing interface, connect the table input and table output, as shown in the figure:

Graphical code analysis of migrating mysql data to Oracle

Right-click the table input, select the edit step, and the following window will pop up:

Graphical code analysis of migrating mysql data to Oracle

Connect to the database Select the connected data there, select mysql here, and click Edit to modify the database. If the database has not been configured yet, click New, and the database will be configured. For specific configuration, please view the kettle-configuration resource library.

Enter the sql statement in the sql input box to filter the data to be migrated. If the sql statement contains variables, check the box below to replace the variables in the sql statement.

Right-click the table output, select the edit step, and the following window will pop up:

Graphical code analysis of migrating mysql data to Oracle

The database connection is similar to the table input, except that Oracle is selected here. Select from_mysql in the target table. Because we selected test data and the amount of data is not large, the number of submitted records here can be kept as default.

Next, create a new job and name it table output. Find start, set variables, and transformation in the general area of ​​the core object, drag it to the editing interface, and connect the three objects, as shown in the figure:

Graphical code analysis of migrating mysql data to Oracle

Right-click set variables, select the edit job entry, edit the variable name name and variable value in the pop-up window, as shown below:

Graphical code analysis of migrating mysql data to Oracle

right Click transformation, select the edit job entry, select the transformation name in the pop-up window, and find the transformation you just saved: table input to expression. As shown below:

Graphical code analysis of migrating mysql data to Oracle

At this point, all the work is completed. Click Run to extract data from mysql and transfer it to Oracle.

The above is the detailed content of Graphical code analysis of migrating mysql data to Oracle. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template