Using Sqoop to import data from MySQL to Hive

前端 未结 6 1967
攒了一身酷
攒了一身酷 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:00

    No need to create a table. Its not necessary. While we are importing itself we can do it. Please look the below command.

    sqoop import --connect jdbc:mysql://mysql_server:3306/db_name \
    --username mysql_user \
    --password mysql_pass \
    --table table_name \
    --hive-import
    

提交回复
热议问题