Using Sqoop to import data from MySQL to Hive

前端 未结 6 2079
攒了一身酷
攒了一身酷 2021-02-06 10:12

I am using Sqoop (version 1.4.4) to import data from MySQL to Hive. The data will be a subset of one of tables, i.e. few columns from a table. Is it necessary to create table in

6条回答
  •  無奈伤痛
    2021-02-06 11:04

    Even if there is no table in hive, sqoop import will create it. The following worked for me :

    sqoop import --connect jdbc:mysql://localhost/<> --username <> --password <> --table employee --hive-import --hive-table employee_1 -m -1
    

提交回复
热议问题