Home Database Mysql Tutorial Kettle_抽取数据举例

Kettle_抽取数据举例

Jun 07, 2016 pm 04:13 PM
use experiment extract data project

实验项目:使用kettle完成scott用户下的emp表数据抽取到hyl用户下emptest表 实验环境 操作系统:WIN7 数据库:Oracle11G R2 64 bit KETTLE版本:version 3.2.2 开始实验: 1. 查询scott用户下emp表的数据 2. hyl用户下创建实验表(emptest) 3. 查询hyl用户

实验项目:使用kettle完成scott用户下的emp表数据抽取到hyl用户下emptest表

 

实验环境

操作系统:WIN7

数据库:Oracle11G R2 64 bit

KETTLE版本:version 3.2.2

 

开始实验:

1. 查询scott用户下emp表的数据

\

2. hyl用户下创建实验表(emptest)

\

3. 查询hyl用户下实验表(emptest)数据

\

4. 配置kettle

点击“没有资源库”启动,之后添加数据库连接即可,如下图:

\

新建一个转换,如下图:

\

点击“表输入”,拖动到面板内,如下图:

\

同理,在输出项目中,选择“插入/更新”添加到面板内,如下图:

\

点击“表输入”图标,然后按住“SHIFT”,连接到“插入/更新”图标,如下图所示:

\

双击“表输入”图标,点击“新建”按钮,进入到如下配置界面,参考图下设置,完成数据库连接配置并进行测试,如下图所示:

\

完成“表输入”中数据库连接设置后,接下来按同样的方法对“插入/更新”图标下的数据库连接进行配置,参考配置如下:

\

完成,“表输入”和“插入/更新”的数据库连接配置后,双击“表输入”,进入如下界面,选择数据库连接为“scott”,也就是我们之前的数据源数据库,点击“获取SQL查询语句”,如下图所示:

\

选择我们要抽取的表,如下所示:

\

按提示点击“是”即可,如下图:

\

编写sql脚本,这里我们为使实验简单,源端和目标端的表结构是相同的,如下图所示:

\

双击“插入/更新”图标,对目标端进行配置,选择连接的目标端数据库hyl,点击&ldqu【本文来自鸿网互联 (http://www.68idc.cn)】o;浏览”获取目标表,如下图所示:

\

然后点击“获取字段”,你就可以看到源端和目标端的对应关系。点击“获取更新字段”你就可以看到我们要更新的字段都有哪些,如下图所示:

\

运行前,需要先保存kettle项目,进行保存,如下图:

\

万事俱备,只需运行了,如下图所示:

\

完成抽取后,会提示完成,如下图所示:

\

5. hyl用户验证实验表抽取数据情况

\

至此,我们完成了将scott的emp表数据抽取到hyl用户下的emptest表中,完成实验。

 

原创作品,出自 “深蓝的blog” 博客,欢迎转载,转载时请务必注明以下出处,否则追究版权法律责任。

深蓝的blog:http://blog.csdn.net/huangyanlong/article/details/42264543

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

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What software is crystaldiskmark? -How to use crystaldiskmark? What software is crystaldiskmark? -How to use crystaldiskmark? Mar 18, 2024 pm 02:58 PM

What software is crystaldiskmark? -How to use crystaldiskmark?

Use ddrescue to recover data on Linux Use ddrescue to recover data on Linux Mar 20, 2024 pm 01:37 PM

Use ddrescue to recover data on Linux

Open source! Beyond ZoeDepth! DepthFM: Fast and accurate monocular depth estimation! Open source! Beyond ZoeDepth! DepthFM: Fast and accurate monocular depth estimation! Apr 03, 2024 pm 12:04 PM

Open source! Beyond ZoeDepth! DepthFM: Fast and accurate monocular depth estimation!

Can AI conquer Fermat's last theorem? Mathematician gave up 5 years of his career to turn 100 pages of proof into code Can AI conquer Fermat's last theorem? Mathematician gave up 5 years of his career to turn 100 pages of proof into code Apr 09, 2024 pm 03:20 PM

Can AI conquer Fermat's last theorem? Mathematician gave up 5 years of his career to turn 100 pages of proof into code

The vitality of super intelligence awakens! But with the arrival of self-updating AI, mothers no longer have to worry about data bottlenecks The vitality of super intelligence awakens! But with the arrival of self-updating AI, mothers no longer have to worry about data bottlenecks Apr 29, 2024 pm 06:55 PM

The vitality of super intelligence awakens! But with the arrival of self-updating AI, mothers no longer have to worry about data bottlenecks

Google is ecstatic: JAX performance surpasses Pytorch and TensorFlow! It may become the fastest choice for GPU inference training Google is ecstatic: JAX performance surpasses Pytorch and TensorFlow! It may become the fastest choice for GPU inference training Apr 01, 2024 pm 07:46 PM

Google is ecstatic: JAX performance surpasses Pytorch and TensorFlow! It may become the fastest choice for GPU inference training

How to download foobar2000? -How to use foobar2000 How to download foobar2000? -How to use foobar2000 Mar 18, 2024 am 10:58 AM

How to download foobar2000? -How to use foobar2000

How to use Baidu Netdisk app How to use Baidu Netdisk app Mar 27, 2024 pm 06:46 PM

How to use Baidu Netdisk app

See all articles