一梦文章推荐业务(一)
# 1 数据库迁移需求
业务 mysql 数据库中的数据,会同步到我们的 hadoop 的 hive 数据仓库中。
为了避免直接连接、操作业务数据
同步一份数据在集群中方便进行数据分析操作
123456hive> show databases;OKdefaultprofiletoutiaoTime taken: 0.017 seconds, Fetched: 3 row(s)
创建 hive 业务数据库 onedream
1create database if not exists onedream comment "user,news information of onedream mysql" location '/user/hive/warehouse/onedream.db/';
# 2 sqoop 导入
用户:基本信息,关注,收藏,搜索,订阅(设置选择喜好频道)
文章:分类,文章
123456789101112131415161718192021#!/bin/basharray=(user_profile user_basic ...