
sqoop
snow丶墨冰
这个作者很懒,什么都没留下…
展开
-
sqoop sqlsever to hbase
create table student(id int,name varchar(255),score int ,home varchar(255));insert into student VALUES(1,‘yang’,90,‘beijing’);insert into student VALUES(2,‘chong’,90,‘hanghzou’);与mysql相比,只是改变了数据库连接...转载 2020-03-18 20:10:12 · 137 阅读 · 0 评论 -
sqoop mysql to hbase
mysql 建表create table. student(id int(11),name varchar(255));insert into student values(1,‘yang’);hbase 建表create ‘hbase_student’,‘info’查看hbase中有哪些表listhbase表不存在会自动创建–hbase-create-table \无批次sq...转载 2020-03-18 20:09:02 · 108 阅读 · 0 评论 -
sqoop sqlserver to hive
–全量导入hdfssqoop import –connect ‘jdbc:sqlserver://al-node3:1433;database=test’ –username sa --password 123 –table student –target-dir “/test” –delete-target-dir –split-by id -m 5–增量 导入hdfssqo...转载 2020-03-18 20:06:47 · 405 阅读 · 0 评论 -
sqoop hive to sqlserver
不能使用–staging-table 参数只有两种模式更新更新和插入这个参数必须要加– --identity-insert–hive建表create table if not exists test.student(id int,name string,score int,home string)row format delimited fields terminated...转载 2020-03-18 20:04:57 · 389 阅读 · 0 评论 -
sqoop 整库迁移
sqoop把mysql库中所有表一次性导入hdfs使用import-all-tables,它是强制性的,在该数据库中的每个表必须有一个主键字段。如果有的表没有主键会报错,提示Please specify one with --split-by or perform a sequential import with ‘-m 1’这是因为sqoop 默认四个任务,不指定–split-by,默认用...原创 2020-03-18 20:03:13 · 630 阅读 · 0 评论 -
sqoop hive to mysql
hive to mysql 有三种模式1、默认是把hive中的数据插入到进mysql的 表中2、更新mysql中的数据3、更新和插入mysql中的数据mysql 和 hive中空值存储转化–input-null-string ‘\N’ –input-null-non-string ‘\N’ \先把数据导入到临时表中,成功之后 再把临时表中 的数据导入到真正 的表中。避免导出部分任务...转载 2020-03-18 19:56:41 · 284 阅读 · 0 评论