Sqoop importing data from Hive, hbase into a relational database

Source: Internet
Author: User
Tags sqoop

1.sqoop importing data from hive into MySQL

For example:

Sqoop export--connect jdbc:mysql://10.18.101.15:3306/wda--username restdbuser--password 123456--table adl_trend_num _android--export-dir/apps/hive/warehouse/adldb.db/adl_trend_num_android/date_stamp= $date-- Input-fields-terminated-by ' \ t '

2.sqoop importing data from MySQL into hive

For example:

sqoop Import--connect jdbc:mysql://192.168.66.96:3306/sqoop--username sqoop--password sqoop -- Table Students-m 1

3.sqoop importing data from HBase into MySQL

The data in hive tables is imported into the relational database through the Hive intermediate table.

4.sqoop importing data from a relational database into HBase

For example:

Export the Dept table in Oracle (column ID,NAME,ADDR) to the Dept table in HBase (row key is ID, column family is deptinfo)

Sqoop import--append--connect jdbc:oracle:thin:@192.168.66.90:1521:orcl--username Test--password Test--m 1--table de PT--columns id,name,addr--hbase-create-table--hbase-table dept--hbase-row-key ID--column-family deptinfo


Sqoop importing data from Hive, hbase into a relational database

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.