Get the App
SLTechnology News&Howtos  ›  Servers  › 

Introduction of common commands in sqoop

Shulou Source: shulou.com Published: 2022-06-01 16:38:09 11月04日 Update

This article mainly explains "introduction of common commands in sqoop". Friends who are interested may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "introduction to sqoop common commands".

1. Use sqoop to create a table in hive that is exactly the same as in mysql.

Sqoop create-hive-table-- connect jdbc:mysql://192.168.179.10:7001/test-- username root-- password 123-- hive-database hive--table test6-- hive-table test6

2. Import the data from mysql into hive by sqoop

Sqoop import-- connect jdbc:mysql://192.168.179.10:7001/test-- username root-- password 123-- hive-database hive--table test6-- hive-import

3. Import the table in hive into mysql using sqoop (m specifies the number of mr programs)

Sqoop export--connect jdbc:mysql://192.168.179.10:7001/test-- username root-- password 123-- table test6-- export-dir / user/hive/warehouse/test6-- input-fields-terminated-by'\ 001'-m2

At this point, I believe you have a deeper understanding of the "introduction of sqoop common commands", you might as well come to the actual operation! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: Commands commonly used content learning practical deeper number interest practicality practical simple operation data methods more friends programs websites channels Zhongchuang query Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Microsoft Shulou Information OPPO Reno Huawei