目录
kettle案例之result 接口数据分页存入数据库
/    

kettle案例之result 接口数据分页存入数据库

需求

  1. url为:http://api.lacknb.cn/api/news
  2. 请求result api
  3. get请求
  4. 参数 page、pageSize
  5. 将数据存入数据库

实施

  • 创建表
CREATE TABLE `news_hupu`  (
  `id` int(11) NOT NULL,
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `click_count` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `author` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
  `img_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

创建作业

image.png

image.png

image.png

image.png

image.png

创建转换

image.png

image.png

image.png

image.png

image.png

image.png

image.png

image.png

image.png

image.png


标题:kettle案例之result 接口数据分页存入数据库
作者:gitsilence
地址:http://blog.lacknb.cn/articles/2020/11/21/1605951356342.html