======导入====

sqoop import --connect jdbc:mysql://20.12.20.165:3306/luo0907 --username root --password 12345 --table aa01 --fields-terminated-by '\t' -m 1 --hive-import

sqoop import --connect jdbc:mysql://20.12.20.165:3306/luo0907 --username root --password 12345 --table aa01 --fields-terminated-by '\t' -m 1 --hive-import --hive-overwrite --create-hive-table --hive-table luo0908.aa01 --delete-target-dir
sqoop import --connect jdbc:mysql://20.12.20.165:3306/luo0907 --username root --password 12345 --table aa01 --target-dir /luo2/luo01 ###要用hdfs用户执行

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '12345' WITH GRANT OPTION;
hadoop fs -chown root:hdfs /tmp/test.txt

=====导出=====
sqoop export --connect jdbc:mysql://20.12.20.165:3306/luo0907 --username root --password 12345 --table aa01 --export-dir '/user/hive/warehouse/luo0908.db/aa01' --fields-terminated-by '\t'

相关文章:

  • 2021-08-06
  • 2022-12-23
  • 2021-08-14
  • 2021-10-08
猜你喜欢
  • 2021-08-23
  • 2021-12-04
  • 2021-07-10
  • 2022-12-23
  • 2021-08-06
相关资源
相似解决方案