准备数据:
源数据full_source
MySQL添加语句如下:
create table `full_source` (
`no` int (10),
`book_name` varchar (60),
`author` varchar (30),
`tag` varchar (60)
);
insert into `full_source` (`no`, `book_name`, `author`, `tag`) values('1','小王子','圣艾克苏佩里','外国文学');
insert into `full_source` (`no`, `book_name`, `author`, `tag`) values('2','解忧杂货店','东野圭吾','小说');
insert into `full_source` (`no`, `book_name`, `author`, `tag`) values('3','白夜行','东野圭吾','小说');
insert into `full_source` (`no`, `book_name`, `author`, `tag`) values('4','梦里花落知多少','郭敬明','小说');
insert into `full_source` (`no`, `book_name`, `author`, `tag`) values('5','看见','柴静','随笔');
insert into `full_source` (`no`, `book_name`, `author`, `tag`) values('6','围城','钱钟书','小说');
目标表full_target
MySQL添加语句如下:
create table `full_target` (
`no` int (10),
`book_name` varchar (60),
`author` varchar (30),
`tag` varchar (60)
);
insert into `full_target` (`no`, `book_name`, `author`, `tag`) values('1','小王子','圣艾克苏佩里','外国文学');
insert into `full_target` (`no`, `book_name`, `author`, `tag`) values('2','解忧杂货店','东野圭吾','小说');
insert into `full_target` (`no`, `book_name`, `author`, `tag`) values('5','看见','柴静','随笔');
1.打开kettle工具,创建转换full_load,并添加如下控件及Hop跳连接线
2.配置“执行SQL脚本”控件
3.配置“表输入”控件
4.配置“表输出”控件
5.运行full_load转换,并查看目标表